Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: webrtc/p2p/base/port.h

Issue 1376983002: Do not time out a port if its role switched from controlled to controlling. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/p2p/base/port.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/port.h
diff --git a/webrtc/p2p/base/port.h b/webrtc/p2p/base/port.h
index 4616963aa0a998ced683c6212de84d7e51145c49..c6b7f609aad7500e6ad7d0b68676e2a59c072d5a 100644
--- a/webrtc/p2p/base/port.h
+++ b/webrtc/p2p/base/port.h
@@ -288,7 +288,7 @@ class Port : public PortInterface, public rtc::MessageHandler,
protected:
enum {
- MSG_CHECKTIMEOUT = 0,
+ MSG_DEAD = 0,
MSG_FIRST_AVAILABLE
};
@@ -340,8 +340,11 @@ class Port : public PortInterface, public rtc::MessageHandler,
// Called when one of our connections deletes itself.
void OnConnectionDestroyed(Connection* conn);
- // Checks if this port is useless, and hence, should be destroyed.
- void CheckTimeout();
+ // Whether this port is dead, and hence, should be destroyed on the controlled
+ // side.
+ bool dead() const {
+ return ice_role_ == ICEROLE_CONTROLLED && connections_.empty();
+ }
rtc::Thread* thread_;
rtc::PacketSocketFactory* factory_;
« no previous file with comments | « no previous file | webrtc/p2p/base/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698