Skip to content

Commit a891c9a

Browse files
committed
Rely on state change to cancel future
1 parent 3edd4b5 commit a891c9a

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/matrixrtc/MatrixRTCSession.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ export class MatrixRTCSession extends TypedEventEmitter<MatrixRTCSessionEvent, M
138138
private encryptionKeys = new Map<string, Array<Uint8Array>>();
139139
private lastEncryptionKeyUpdateRequest?: number;
140140

141-
private disconnectFutureId: string | undefined;
142-
143141
/**
144142
* The callId (sessionId) of the call.
145143
*
@@ -890,19 +888,11 @@ export class MatrixRTCSession extends TypedEventEmitter<MatrixRTCSessionEvent, M
890888
{}, // leave event
891889
stateKey,
892890
);
893-
this.disconnectFutureId = res.future_id;
894891
this.scheduleRefreshFuture(res.future_id);
895892
} catch (e) {
896893
logger.error("Failed to send future:", e);
897894
}
898895
}
899-
} else if (!legacy && this.disconnectFutureId !== undefined) {
900-
// TODO: remove this once the Synapse MSC4140 implementation cancels timeout futures on state change
901-
try {
902-
await this.client._unstable_updateFuture(this.disconnectFutureId, UpdateFutureAction.Cancel);
903-
} catch (e) {
904-
logger.error("Failed to cancel future:", e);
905-
}
906896
}
907897
} catch (e) {
908898
const resendDelay = CALL_MEMBER_EVENT_RETRY_DELAY_MIN + Math.random() * 2000;

0 commit comments

Comments
 (0)