Merge branch 'voip/correctly-end-the-call' into 'main'

fix: Correctly end the call.

See merge request famedly/company/frontend/famedlysdk!964
This commit is contained in:
Krille Fear 2022-02-16 06:28:02 +00:00
commit 6d86001f86
1 changed files with 2 additions and 2 deletions

View File

@ -383,12 +383,12 @@ class CallSession {
setCallState(CallState.kRinging);
ringingTimer = Timer(Duration(milliseconds: lifetime - 3000), () {
ringingTimer = Timer(Duration(milliseconds: 30000 - lifetime), () {
if (state == CallState.kRinging) {
Logs().v('[VOIP] Call invite has expired. Hanging up.');
hangupParty = CallParty.kRemote; // effectively
setCallState(CallState.kEnded);
fireCallEvent(CallEvent.kHangup);
hangup(CallErrorCode.InviteTimeout);
}
ringingTimer?.cancel();
ringingTimer = null;