Index: webrtc/p2p/base/port.h |
diff --git a/webrtc/p2p/base/port.h b/webrtc/p2p/base/port.h |
index 47903be05b55753b063e6bc8630946d8938e59a1..866f65f3ab6f8ee01c5d5882223f5ac807574b74 100644 |
--- a/webrtc/p2p/base/port.h |
+++ b/webrtc/p2p/base/port.h |
@@ -50,9 +50,9 @@ extern const char TCPTYPE_ACTIVE_STR[]; |
extern const char TCPTYPE_PASSIVE_STR[]; |
extern const char TCPTYPE_SIMOPEN_STR[]; |
-// If a connection does not receive anything for this long, it is considered |
-// dead. |
-const uint32 DEAD_CONNECTION_RECEIVE_TIMEOUT = 30 * 1000; // 30 seconds. |
+// If a connection does not receive anything for this long and it has timed out |
+// on writing, it will be deleted. |
+const uint32 DEAD_CONNECTION_RECEIVE_TIMEOUT = 10 * 1000; // 10 seconds. |
pthatcher1
2015/09/28 23:07:28
I think there are actually two different things he
honghaiz3
2015/09/29 18:47:50
Done.
|
// The timeout duration when a connection does not receive anything. |
const uint32 WEAK_CONNECTION_RECEIVE_TIMEOUT = 2500; // 2.5 seconds |
@@ -573,7 +573,7 @@ class Connection : public rtc::MessageHandler, |
void set_connected(bool value); |
// Checks if this connection is useless, and hence, should be destroyed. |
- void CheckTimeout(); |
+ void CheckTimeout(uint32 now); |
void OnMessage(rtc::Message *pmsg); |
@@ -615,6 +615,7 @@ class Connection : public rtc::MessageHandler, |
State state_; |
// Time duration to switch from receiving to not receiving. |
uint32 receiving_timeout_; |
+ uint32 time_created_ms_; |
friend class Port; |
friend class ConnectionRequest; |