webrtc wpt: check signalingState before addIceCandidate
in order to avoid issues with calling addIceCandidate when the peerconnection is closed BUG=836871 Change-Id: I698f5365a4e1b72a812fbc5e3adf5e51586718a6 Reviewed-on: https://chromium-review.googlesource.com/1079550 Commit-Queue: Philipp Hancke <philipp.hancke@googlemail.com> Commit-Queue: Henrik Boström <hbos@chromium.org> Reviewed-by: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#563196}
This commit is contained in:

committed by
Commit Bot

parent
06211ba1d4
commit
d1b660a741
@@ -199,7 +199,7 @@ function exchangeIceCandidates(pc1, pc2) {
|
||||
// There is ongoing discussion on w3c/webrtc-pc#1213
|
||||
// that there should be an empty candidate string event
|
||||
// for end of candidate for each m= section.
|
||||
if(candidate) {
|
||||
if(candidate && remotePc.signalingState !== 'closed') {
|
||||
remotePc.addIceCandidate(candidate);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user