Chromium Code Reviews| Index: webrtc/p2p/base/p2ptransportchannel.cc |
| diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc |
| index 3f68d6d6e078fd635e8f696b3b46ae12bae8ce67..0e891777795846a2ffd72c9d1c6346b9c4ee798f 100644 |
| --- a/webrtc/p2p/base/p2ptransportchannel.cc |
| +++ b/webrtc/p2p/base/p2ptransportchannel.cc |
| @@ -470,10 +470,21 @@ void P2PTransportChannel::MaybeStartGathering() { |
| OnCandidatesAllocationDone(raw_pooled_session); |
| } |
| } else { |
| + 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; |
| + } |
| + PortAllocatorSession* session = allocator_session(); |
| + session->SignalIceRegatheringReason(session, reason); |
|
Taylor Brandstetter
2016/10/03 20:33:34
Calling another class's signal breaks encapsulatio
honghaiz3
2016/10/04 01:03:54
We can, but it would require some wiring of the po
Taylor Brandstetter
2016/10/04 02:42:32
I think that's the right thing to do. We'll need t
honghaiz3
2016/10/05 05:01:53
Done.
|
| + } |
|
Taylor Brandstetter
2016/10/03 20:33:34
I think this should be outside the if/else block,
honghaiz3
2016/10/04 01:03:54
Done.
|
| AddAllocatorSession(allocator_->CreateSession( |
| transport_name(), component(), ice_parameters_.ufrag, |
| ice_parameters_.pwd)); |
| - LOG(LS_INFO) << "Start getting ports"; |
|
Taylor Brandstetter
2016/10/03 20:33:34
Why remove this log statement? Is there another on
honghaiz3
2016/10/04 01:03:54
I moved it to StartGettingPorts(). It is better to
|
| allocator_sessions_.back()->StartGettingPorts(); |
| } |
| } |