Merge pull request #1610 from famedly/reza/crash-calls

Hangup on call crash
This commit is contained in:
td 2023-11-15 16:24:36 +05:30 committed by GitHub
commit 7324064f22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1200,7 +1200,9 @@ class CallSession {
setCallState(CallState.kEnded);
if (!isGroupCall) {
if (callId != voip.currentCID) return;
// when a call crash and this call is already terminated the currentCId is null.
// So don't return bc the hangup or reject will not proceed anymore.
if (callId != voip.currentCID && voip.currentCID != null) return;
voip.currentCID = null;
voip.incomingCallRoomId.removeWhere((key, value) => value == callId);
}