Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1035)

Unified Diff: talk/app/webrtc/peerconnection.cc

Issue 1350523003: TransportController refactoring. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing Mac test. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/objctests/RTCPeerConnectionTest.mm ('k') | talk/app/webrtc/statscollector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/peerconnection.cc
diff --git a/talk/app/webrtc/peerconnection.cc b/talk/app/webrtc/peerconnection.cc
index 41df847cd68ddaa344c703def4549aa3ed81701d..121565593d718c83e2f884268a59c3e090691a1a 100644
--- a/talk/app/webrtc/peerconnection.cc
+++ b/talk/app/webrtc/peerconnection.cc
@@ -616,6 +616,10 @@ void PeerConnection::SetLocalDescription(
}
SetSessionDescriptionMsg* msg = new SetSessionDescriptionMsg(observer);
signaling_thread()->Post(this, MSG_SET_SESSIONDESCRIPTION_SUCCESS, msg);
+ // MaybeStartGathering needs to be called after posting
+ // MSG_SET_SESSIONDESCRIPTION_SUCCESS, so that we don't signal any candidates
+ // before signaling that SetLocalDescription completed.
+ session_->MaybeStartGathering();
}
void PeerConnection::SetRemoteDescription(
@@ -868,6 +872,11 @@ void PeerConnection::OnRemoveLocalStream(MediaStreamInterface* stream) {
void PeerConnection::OnIceConnectionChange(
PeerConnectionInterface::IceConnectionState new_state) {
ASSERT(signaling_thread()->IsCurrent());
+ // After transitioning to "closed", ignore any additional states from
+ // WebRtcSession (such as "disconnected").
+ if (ice_connection_state_ == kIceConnectionClosed) {
+ return;
+ }
ice_connection_state_ = new_state;
observer_->OnIceConnectionChange(ice_connection_state_);
}
« no previous file with comments | « talk/app/webrtc/objctests/RTCPeerConnectionTest.mm ('k') | talk/app/webrtc/statscollector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698