Index: webrtc/p2p/base/p2ptransportchannel.cc |
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc |
index 4ebd3a41c44612585ba4340a34d816e5e77fe167..189b4bfec8409f6f068ff8983576e633fd07f5f2 100644 |
--- a/webrtc/p2p/base/p2ptransportchannel.cc |
+++ b/webrtc/p2p/base/p2ptransportchannel.cc |
@@ -309,9 +309,14 @@ void P2PTransportChannel::SetRemoteIceMode(IceMode mode) { |
void P2PTransportChannel::SetIceConfig(const IceConfig& config) { |
if (config_.continual_gathering_policy != config.continual_gathering_policy) { |
- LOG(LS_INFO) << "Set continual_gathering_policy to " |
- << config_.continual_gathering_policy; |
- config_.continual_gathering_policy = config.continual_gathering_policy; |
+ if (!allocator_sessions_.empty()) { |
Taylor Brandstetter
2016/07/07 17:52:37
This class assumes the continual gathering policy
honghaiz3
2016/07/21 04:10:59
If you set continual gathering policy after a sess
Taylor_Brandstetter
2016/07/21 16:41:01
This is the problem in my opinion. From an applica
honghaiz3
2016/07/21 17:37:25
In my opinion, the race condition is still there.
Taylor Brandstetter
2016/07/21 18:38:38
Sessions, including pooled sessions, are only adde
honghaiz3
2016/07/21 21:22:05
Can you please make a comment on the parameter con
pthatcher1
2016/07/22 18:11:22
While I agree consistent behavior is good, it woul
Taylor Brandstetter
2016/07/22 19:58:42
JSEP already says that SetConfiguration only chang
pthatcher1
2016/08/23 00:55:39
That's a good point about SetConfiguration only al
|
+ LOG(LS_ERROR) << "Trying to change continual gathering policy " |
+ << "when gathering has already started!"; |
+ } else { |
+ LOG(LS_INFO) << "Set continual_gathering_policy to " |
+ << config_.continual_gathering_policy; |
+ config_.continual_gathering_policy = config.continual_gathering_policy; |
+ } |
} |
if (config.backup_connection_ping_interval >= 0 && |
@@ -470,6 +475,13 @@ void P2PTransportChannel::OnCandidatesReady( |
void P2PTransportChannel::OnCandidatesAllocationDone( |
PortAllocatorSession* session) { |
ASSERT(worker_thread_ == rtc::Thread::Current()); |
+ if (config_.gather_continually()) { |
+ LOG(LS_INFO) << "P2PTransportChannel: " << transport_name() |
+ << ", component " << component() |
+ << " gathering complete, but using continual " |
+ << "gathering so not changing gathering state."; |
+ return; |
+ } |
gathering_state_ = kIceGatheringComplete; |
LOG(LS_INFO) << "P2PTransportChannel: " << transport_name() << ", component " |
<< component() << " gathering complete"; |