| Index: webrtc/p2p/base/p2ptransportchannel.h
|
| diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h
|
| index 51979df8d8e1fe8a277368ea0684f36dbbb89d6b..73036310d66d23e92c9a7f5077466aec78238dc8 100644
|
| --- a/webrtc/p2p/base/p2ptransportchannel.h
|
| +++ b/webrtc/p2p/base/p2ptransportchannel.h
|
| @@ -156,12 +156,15 @@ class P2PTransportChannel : public TransportChannelImpl,
|
| // Public for unit tests.
|
| Connection* FindNextPingableConnection();
|
|
|
| - private:
|
| - rtc::Thread* thread() { return worker_thread_; }
|
| + // Helper method used only in unit tests.
|
| PortAllocatorSession* allocator_session() {
|
| return allocator_sessions_.back();
|
| }
|
|
|
| + private:
|
| + rtc::Thread* thread() { return worker_thread_; }
|
| +
|
| +
|
| // 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;
|
| @@ -173,6 +176,7 @@ class P2PTransportChannel : public TransportChannelImpl,
|
| void HandleWritable();
|
| void HandleNotWritable();
|
| void HandleAllTimedOut();
|
| + void MaybeStopSessions();
|
|
|
| Connection* GetBestConnectionOnNetwork(rtc::Network* network) const;
|
| bool CreateConnections(const Candidate& remote_candidate,
|
| @@ -234,7 +238,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_;
|
| @@ -252,6 +255,9 @@ class P2PTransportChannel : public TransportChannelImpl,
|
| int receiving_timeout_;
|
| uint32_t last_ping_sent_ms_ = 0;
|
| bool gather_continually_ = false;
|
| + // Whether a new session has been started to get ports and it is not
|
| + // stopped yet.
|
| + bool is_getting_ports_ = false;
|
|
|
| RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
|
| };
|
|
|