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

Unified Diff: net/quic/quic_connection.cc

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Rebase. Created 4 years, 11 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 | « net/quic/quic_connection.h ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 6eabc9d8c4b5d9da2df269fbc6b448a3c49672e0..13a8be19dbf0262b3c42a1ad63483b3f755a73c1 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -153,7 +153,7 @@ class PingAlarm : public QuicAlarm::Delegate {
explicit PingAlarm(QuicConnection* connection) : connection_(connection) {}
QuicTime OnAlarm() override {
- connection_->SendPing();
+ connection_->OnPingTimeout();
return QuicTime::Zero();
}
@@ -1811,10 +1811,13 @@ PeerAddressChangeType QuicConnection::DeterminePeerAddressChangeType() {
return UNKNOWN;
}
-void QuicConnection::SendPing() {
- if (retransmission_alarm_->IsSet()) {
- return;
+void QuicConnection::OnPingTimeout() {
+ if (!retransmission_alarm_->IsSet()) {
+ SendPing();
}
+}
+
+void QuicConnection::SendPing() {
packet_generator_.AddControlFrame(QuicFrame(QuicPingFrame()));
}
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698