Explorar o código

End peer if ICE failed

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic %!s(int64=7) %!d(string=hai) anos
pai
achega
26c7a3455a

+ 3 - 0
app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java

@@ -194,6 +194,9 @@ public class MagicPeerConnectionWrapper {
             if (iceConnectionState.equals(PeerConnection.IceConnectionState.CONNECTED) && hasInitiated) {
                 sendChannelData(new DataChannelMessage("videoOn"));
                 sendChannelData(new DataChannelMessage("audioOn"));
+            } else if (iceConnectionState.equals(PeerConnection.IceConnectionState.FAILED)) {
+                EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
+                        .CLOSE_PEER, sessionId));
             }
         }