Skip to content

Commit 56f84a7

Browse files
committed
Rely on state change to cancel future
1 parent 3ea6d37 commit 56f84a7

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
*
@@ -891,19 +889,11 @@ export class MatrixRTCSession extends TypedEventEmitter<MatrixRTCSessionEvent, M
891889
{}, // leave event
892890
stateKey,
893891
);
894-
this.disconnectFutureId = res.future_id;
895892
this.scheduleRefreshFuture(res.future_id);
896893
} catch (e) {
897894
logger.error("Failed to send future:", e);
898895
}
899896
}
900-
} else if (!legacy && this.disconnectFutureId !== undefined) {
901-
// TODO: remove this once the Synapse MSC4140 implementation cancels timeout futures on state change
902-
try {
903-
await this.client._unstable_updateFuture(this.disconnectFutureId, UpdateFutureAction.Cancel);
904-
} catch (e) {
905-
logger.error("Failed to cancel future:", e);
906-
}
907897
}
908898
} catch (e) {
909899
const resendDelay = CALL_MEMBER_EVENT_RETRY_DELAY_MIN + Math.random() * 2000;

0 commit comments

Comments
 (0)