Skip to content

Commit

Permalink
Merge pull request #1610 from famedly/reza/crash-calls
Browse files Browse the repository at this point in the history
Hangup on call crash
  • Loading branch information
techno-disaster authored Nov 15, 2023
2 parents 7bcd584 + d5447c6 commit 7324064
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/voip/call.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7324064

Please sign in to comment.