Fix reconnection when the web socket was abruptly closed

When the web socket is abruptly closed it is connected again and the
call is rejoined. However, the call was rejoined in a background thread,
so an exception was thrown when trying to modify the views, which
prevented the call from being joined again.

Besides that the call state needs to be explicitly changed, as if the
web socket was connected again while in a call the state would be
already "JOINED" or "IN_CONVERSATION", which prevents the signaling
settings from being fetched again after the permissions check, and
therefore also prevented the call from being joined again.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2022-11-26 20:14:44 +01:00 committed by Marcel Hibbe (Rebase PR Action)
parent d908fcfeab
commit 6466aaea20

View file

@ -1578,7 +1578,8 @@ public class CallActivity extends CallBaseActivity {
if (currentCallStatus == CallStatus.RECONNECTING) { if (currentCallStatus == CallStatus.RECONNECTING) {
hangup(false); hangup(false);
} else { } else {
initiateCall(); setCallState(CallStatus.RECONNECTING);
runOnUiThread(this::initiateCall);
} }
} }
break; break;