Browse Source

Clean up

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 7 years ago
parent
commit
11e03fb535

+ 4 - 6
app/src/main/java/com/nextcloud/talk/webrtc/MagicPeerConnectionWrapper.java

@@ -125,12 +125,10 @@ public class MagicPeerConnectionWrapper {
     }
 
     public void addCandidate(IceCandidate iceCandidate) {
-        if (peerConnection != null) {
-            if (peerConnection.getRemoteDescription() != null) {
-                peerConnection.addIceCandidate(iceCandidate);
-            } else {
-                iceCandidates.add(iceCandidate);
-            }
+        if (peerConnection != null && peerConnection.getRemoteDescription() != null) {
+            peerConnection.addIceCandidate(iceCandidate);
+        } else {
+            iceCandidates.add(iceCandidate);
         }
     }