Merge pull request #3147 from matrix-org/dbkr/stop_ice_timer_on_terminate

Stop the ICE disconnected timer on call terminate
This commit is contained in:
David Baker
2023-02-13 17:35:45 +01:00
committed by GitHub
+5
View File
@@ -2174,6 +2174,7 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
// chrome doesn't implement any of the 'onstarted' events yet
if (["connected", "completed"].includes(this.peerConn?.iceConnectionState ?? "")) {
clearTimeout(this.iceDisconnectedTimeout);
this.iceDisconnectedTimeout = undefined;
this.state = CallState.Connected;
if (!this.callLengthInterval && !this.callStartTime) {
@@ -2546,6 +2547,10 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
clearTimeout(this.inviteTimeout);
this.inviteTimeout = undefined;
}
if (this.iceDisconnectedTimeout !== undefined) {
clearTimeout(this.iceDisconnectedTimeout);
this.iceDisconnectedTimeout = undefined;
}
if (this.callLengthInterval) {
clearInterval(this.callLengthInterval);
this.callLengthInterval = undefined;