Commit 03dfe7e2 authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Do not fire ICE state change events when PC is closed.

Bug: chromium:1023736
Change-Id: I38f81d9445741321e61e84145591a5e589364b29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911203Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714453}
parent e7b48931
......@@ -3120,9 +3120,10 @@ bool RTCPeerConnection::SetIceGatheringState(
void RTCPeerConnection::ChangeIceConnectionState(
webrtc::PeerConnectionInterface::IceConnectionState ice_connection_state) {
if (ice_connection_state_ ==
webrtc::PeerConnectionInterface::kIceConnectionClosed ||
ice_connection_state_ == ice_connection_state) {
if (closed_) {
return;
}
if (ice_connection_state_ == ice_connection_state) {
return;
}
ice_connection_state_ = ice_connection_state;
......
This is a testharness.js-based test.
PASS Initial iceConnectionState should be new
PASS Closing the connection should set iceConnectionState to closed
PASS connection with one data channel should eventually have connected or completed connection state
PASS connection with one data channel should eventually have connected connection state
PASS connection with audio track should eventually have connected connection state
PASS connection with audio and video tracks should eventually have connected connection state
PASS ICE can connect in a recvonly usecase
PASS iceConnectionState changes at the right time, with bundle policy balanced
PASS iceConnectionState changes at the right time, with bundle policy max-bundle
PASS iceConnectionState changes at the right time, with bundle policy max-compat
PASS Responder ICE connection state behaves as expected
FAIL Closing a PeerConnection should not fire iceconnectionstatechange event assert_unreached: Reached unreachable code
Harness: the test ran to completion.
......@@ -10,6 +10,6 @@ FAIL iceConnectionState changes at the right time, with bundle policy balanced p
FAIL iceConnectionState changes at the right time, with bundle policy max-bundle promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'sender' of undefined"
FAIL iceConnectionState changes at the right time, with bundle policy max-compat promise_test: Unhandled rejection with value: object "TypeError: Cannot read property 'sender' of undefined"
PASS Responder ICE connection state behaves as expected
FAIL Closing a PeerConnection should not fire iceconnectionstatechange event assert_unreached: Reached unreachable code
PASS Closing a PeerConnection should not fire iceconnectionstatechange event
Harness: the test ran to completion.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment