Index: webrtc/p2p/base/p2ptransportchannel.cc |
diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc |
index 3f68d6d6e078fd635e8f696b3b46ae12bae8ce67..6aeac99a75ef4ea39fdbe46a896e4251d67d713d 100644 |
--- a/webrtc/p2p/base/p2ptransportchannel.cc |
+++ b/webrtc/p2p/base/p2ptransportchannel.cc |
@@ -451,6 +451,19 @@ void P2PTransportChannel::MaybeStartGathering() { |
gathering_state_ = kIceGatheringGathering; |
SignalGatheringState(this); |
} |
+ |
+ if (!allocator_sessions_.empty()) { |
+ IceRegatheringReason reason; |
+ if (writable()) { |
+ reason = IceRegatheringReason::ICE_RESTART_WHEN_CONNECTED; |
+ } else if (IsGettingPorts()) { |
+ reason = IceRegatheringReason::ICE_RESTART_WHEN_CONNECTING; |
+ } else { |
+ reason = IceRegatheringReason::ICE_RESTART_WHEN_DISCONNECTED; |
+ } |
+ allocator_->ReportIceRegatheringReason(reason); |
+ } |
+ |
// Time for a new allocator. |
std::unique_ptr<PortAllocatorSession> pooled_session = |
allocator_->TakePooledSession(transport_name(), component(), |
@@ -473,7 +486,6 @@ void P2PTransportChannel::MaybeStartGathering() { |
AddAllocatorSession(allocator_->CreateSession( |
transport_name(), component(), ice_parameters_.ufrag, |
ice_parameters_.pwd)); |
- LOG(LS_INFO) << "Start getting ports"; |
allocator_sessions_.back()->StartGettingPorts(); |
} |
} |