Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-17 09:35:27 +01:00
parent af95d66583
commit 11e03fb535

View file

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