Index: webrtc/p2p/base/p2ptransportchannel.h |
diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h |
index ada3ecfb8bb2deeb6bc5d9120eb1647d7cd1a1da..e44e5344f496e4a9a247ebc69a0d2430b4a1ff07 100644 |
--- a/webrtc/p2p/base/p2ptransportchannel.h |
+++ b/webrtc/p2p/base/p2ptransportchannel.h |
@@ -119,8 +119,8 @@ class P2PTransportChannel : public TransportChannelImpl, |
void set_incoming_only(bool value) { incoming_only_ = value; } |
// Note: This is only for testing purpose. |
- // |ports_| should not be changed from outside. |
- const std::vector<PortInterface*>& ports() { return ports_; } |
+ // |active_ports_| should not be changed from outside. |
+ const std::vector<PortInterface*>& ports() { return active_ports_; } |
IceMode remote_ice_mode() const { return remote_ice_mode_; } |
@@ -297,7 +297,13 @@ class P2PTransportChannel : public TransportChannelImpl, |
bool incoming_only_; |
int error_; |
std::vector<std::unique_ptr<PortAllocatorSession>> allocator_sessions_; |
- std::vector<PortInterface *> ports_; |
+ // |active_ports_| contains ports that are used to form new connections when |
+ // new remote candidates are added. |
+ std::vector<PortInterface*> active_ports_; |
+ // |inactive_ports_| contains ports that aren't being used to form new |
+ // connections, but that aren't yet destroyed. They may have existing |
+ // connections, and they still fire signals such as SignalUnknownAddress. |
+ std::vector<PortInterface*> inactive_ports_; |
pthatcher1
2016/06/15 22:13:20
For names, how about ports_ and removed_ports_wait
Taylor Brandstetter
2016/06/16 00:53:33
I think removed_ports_ is sufficiently unambiguous
|
// |connections_| is a sorted list with the first one always be the |
// |best_connection_| when it's not nullptr. The combination of |