Chromium Code Reviews| Index: webrtc/p2p/base/p2ptransportchannel.cc |
| diff --git a/webrtc/p2p/base/p2ptransportchannel.cc b/webrtc/p2p/base/p2ptransportchannel.cc |
| index 66532411b29f5241c6b0f163d87c91d7ba9cbe2a..cf9ddf49dc3d88ee9045dcd67325d2f29ff9013e 100644 |
| --- a/webrtc/p2p/base/p2ptransportchannel.cc |
| +++ b/webrtc/p2p/base/p2ptransportchannel.cc |
| @@ -1400,10 +1400,13 @@ void P2PTransportChannel::OnConnectionStateChange(Connection* connection) { |
| } |
| // May stop the allocator session when at least one connection becomes |
| - // strongly connected after starting to get ports. It is not enough to check |
| + // strongly connected after starting to get ports and the local candidate of |
| + // the connection is at the latest generation. It is not enough to check |
| // that the connection becomes weakly connected because the connection may be |
| // changing from (writable, receiving) to (writable, not receiving). |
| - if (!connection->weak()) { |
| + if (!connection->weak() && |
| + connection->local_candidate().generation() >= |
| + allocator_session()->generation()) { |
|
pthatcher1
2016/04/11 19:35:21
Can you make a variable to improve readability?
b
honghaiz3
2016/04/18 23:50:24
Done.
|
| MaybeStopPortAllocatorSessions(); |
| } |