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

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

Issue 1207563002: Add flakiness check if there is no received packets in a certain period. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Address more comments Created 5 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 | « webrtc/p2p/base/port.h ('k') | webrtc/p2p/base/session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/port.cc
diff --git a/webrtc/p2p/base/port.cc b/webrtc/p2p/base/port.cc
index 25b5efd05689ef2e31da3ce4ac512ed4d14c61b4..d1ca8416235195934e6552f8db071b60a6427f5a 100644
--- a/webrtc/p2p/base/port.cc
+++ b/webrtc/p2p/base/port.cc
@@ -1003,7 +1003,6 @@ void Connection::OnReadPacket(
if (read_state_ == STATE_READABLE) {
// readable means data from this address is acceptable
// Send it on!
-
last_data_received_ = rtc::Time();
recv_rate_tracker_.Update(size);
SignalReadPacket(this, data, size, packet_time);
@@ -1444,6 +1443,11 @@ void Connection::OnMessage(rtc::Message *pmsg) {
delete this;
}
+uint32 Connection::last_received() {
+ return std::max(last_data_received_,
+ std::max(last_ping_received_, last_ping_response_received_));
+}
+
size_t Connection::recv_bytes_second() {
return recv_rate_tracker_.units_second();
}
« no previous file with comments | « webrtc/p2p/base/port.h ('k') | webrtc/p2p/base/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698