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

Unified Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 2124283003: Fixing inconsistency with behavior of `ClearGettingPorts`. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing test that tried to enable continual gathering in the middle of a session. Created 4 years, 4 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 | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.cc
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc
index d4d0e5e3274ee72d8340836f100de33c2400c0ae..03b0ed426a7d5e1bae0eb2130f5ca504fe1dae87 100644
--- a/webrtc/p2p/base/p2ptransportchannel.cc
+++ b/webrtc/p2p/base/p2ptransportchannel.cc
@@ -351,9 +351,14 @@ void P2PTransportChannel::SetRemoteIceMode(IceMode mode) {
void P2PTransportChannel::SetIceConfig(const IceConfig& config) {
if (config_.continual_gathering_policy != config.continual_gathering_policy) {
- config_.continual_gathering_policy = config.continual_gathering_policy;
- LOG(LS_INFO) << "Set continual_gathering_policy to "
- << config_.continual_gathering_policy;
+ if (!allocator_sessions_.empty()) {
+ LOG(LS_ERROR) << "Trying to change continual gathering policy "
+ << "when gathering has already started!";
+ } else {
+ config_.continual_gathering_policy = config.continual_gathering_policy;
+ LOG(LS_INFO) << "Set continual_gathering_policy to "
+ << config_.continual_gathering_policy;
+ }
}
if (config.backup_connection_ping_interval >= 0 &&
@@ -524,6 +529,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";
« no previous file with comments | « webrtc/api/webrtcsession_unittest.cc ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698