Index: webrtc/p2p/base/p2ptransportchannel.h |
diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h |
index 9efb96c42d091759b28d5c25b21a96ab52228359..f3211e4a537ba4415371085a562778cd3830644d 100644 |
--- a/webrtc/p2p/base/p2ptransportchannel.h |
+++ b/webrtc/p2p/base/p2ptransportchannel.h |
@@ -161,12 +161,15 @@ class P2PTransportChannel : public TransportChannelImpl, |
// Public for unit tests. |
const std::vector<Connection*>& connections() const { return connections_; } |
- private: |
- rtc::Thread* thread() { return worker_thread_; } |
+ // Public for unit tests. |
PortAllocatorSession* allocator_session() { |
return allocator_sessions_.back(); |
} |
+ private: |
+ rtc::Thread* thread() { return worker_thread_; } |
+ bool IsGettingPorts() { return allocator_session()->IsGettingPorts(); } |
+ |
// A transport channel is weak if the current best connection is either |
// not receiving or not writable, or if there is no best connection at all. |
bool weak() const; |
@@ -178,6 +181,7 @@ class P2PTransportChannel : public TransportChannelImpl, |
void HandleWritable(); |
void HandleNotWritable(); |
void HandleAllTimedOut(); |
+ void MaybeStopPortAllocatorSessions(); |
Connection* GetBestConnectionOnNetwork(rtc::Network* network) const; |
bool CreateConnections(const Candidate& remote_candidate, |
@@ -239,7 +243,6 @@ class P2PTransportChannel : public TransportChannelImpl, |
Connection* pending_best_connection_; |
std::vector<RemoteCandidate> remote_candidates_; |
bool sort_dirty_; // indicates whether another sort is needed right now |
- bool was_writable_; |
bool had_connection_ = false; // if connections_ has ever been nonempty |
typedef std::map<rtc::Socket::Option, int> OptionMap; |
OptionMap options_; |