Skip to content

Commit

Permalink
fix: hangup on call crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmcoding88 committed Nov 15, 2023
1 parent 7bcd584 commit d5447c6
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 d5447c6

Please sign in to comment.