Skip to content

Commit abc9c9d

Browse files
authored
Merge pull request #3147 from matrix-org/dbkr/stop_ice_timer_on_terminate
Stop the ICE disconnected timer on call terminate
2 parents c67325b + f346fcb commit abc9c9d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/webrtc/call.ts

+5
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,7 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
21742174
// chrome doesn't implement any of the 'onstarted' events yet
21752175
if (["connected", "completed"].includes(this.peerConn?.iceConnectionState ?? "")) {
21762176
clearTimeout(this.iceDisconnectedTimeout);
2177+
this.iceDisconnectedTimeout = undefined;
21772178
this.state = CallState.Connected;
21782179

21792180
if (!this.callLengthInterval && !this.callStartTime) {
@@ -2546,6 +2547,10 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
25462547
clearTimeout(this.inviteTimeout);
25472548
this.inviteTimeout = undefined;
25482549
}
2550+
if (this.iceDisconnectedTimeout !== undefined) {
2551+
clearTimeout(this.iceDisconnectedTimeout);
2552+
this.iceDisconnectedTimeout = undefined;
2553+
}
25492554
if (this.callLengthInterval) {
25502555
clearInterval(this.callLengthInterval);
25512556
this.callLengthInterval = undefined;

0 commit comments

Comments
 (0)