From 4c50125e9d9df001c3e8a180240dc6d91a30e4cd Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 4 Dec 2020 20:22:01 +0000 Subject: [PATCH] Don't remove call when we call hangup as hopefully explained by comment --- src/CallHandler.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 925c638add..f443e59090 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -566,7 +566,8 @@ export default class CallHandler { } else { this.calls.get(payload.room_id).hangup(CallErrorCode.UserHangup, false); } - this.removeCallForRoom(payload.room_id); + // don't remove the call yet: let the hangup event handler do it (otherwise it will throw + // the hangup event away) break; case 'answer': { if (!this.calls.has(payload.room_id)) {