Skip to content

Commit

Permalink
webrtc wpt: check signalingState before addIceCandidate
Browse files Browse the repository at this point in the history
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 <[email protected]>
Commit-Queue: Henrik Boström <[email protected]>
Reviewed-by: Henrik Boström <[email protected]>
Cr-Commit-Position: refs/heads/master@{#563196}
  • Loading branch information
fippo authored and chromium-wpt-export-bot committed Jun 1, 2018
1 parent 75c1b74 commit b14e923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webrtc/RTCPeerConnection-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,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);
}
});
Expand Down

0 comments on commit b14e923

Please sign in to comment.