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

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

Issue 2184013003: Delay destroying a port if new connections are created and destroyed. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 4 years, 5 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 37926c955603a3f27918270b5b43b177cdccddf9..811ffed2cc990e7725104190ebccfc1c92744d54 100644
--- a/webrtc/p2p/base/port.h
+++ b/webrtc/p2p/base/port.h
@@ -297,10 +297,7 @@ class Port : public PortInterface, public rtc::MessageHandler,
int16_t network_cost() const { return network_cost_; }
protected:
- enum {
- MSG_DEAD = 0,
- MSG_FIRST_AVAILABLE
- };
+ enum { MSG_CHECK_DEAD = 0, MSG_FIRST_AVAILABLE };
virtual void UpdateNetworkCost();
@@ -359,9 +356,7 @@ class Port : public PortInterface, public rtc::MessageHandler,
// Whether this port is dead, and hence, should be destroyed on the controlled
// side.
- bool dead() const {
- return ice_role_ == ICEROLE_CONTROLLED && connections_.empty();
- }
+ bool dead() const;
void OnNetworkTypeChanged(const rtc::Network* network);
@@ -401,6 +396,7 @@ class Port : public PortInterface, public rtc::MessageHandler,
// (WiFi. vs. Cellular). It takes precedence over the priority when
// comparing two connections.
uint16_t network_cost_;
+ int64_t last_time_all_connections_removed_ = 0;
friend class Connection;
};
« 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