Эх сурвалжийг харах

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>
Daniel Calviño Sánchez 2 жил өмнө
parent
commit
6466aaea20

+ 2 - 1
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

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