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

Unified Diff: net/quic/quic_chromium_client_session.cc

Issue 2124753005: Implements migration of a QUIC connection to a different destination address if specified by the se… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write-error
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
Index: net/quic/quic_chromium_client_session.cc
diff --git a/net/quic/quic_chromium_client_session.cc b/net/quic/quic_chromium_client_session.cc
index a10373a34071deac27865d68de00db8edddad790..8aab42d4bcf31953c950703cfa7324f5dd8ccef4 100644
--- a/net/quic/quic_chromium_client_session.cc
+++ b/net/quic/quic_chromium_client_session.cc
@@ -737,6 +737,16 @@ void QuicChromiumClientSession::OnClosedStream() {
}
}
+void QuicChromiumClientSession::OnConfigNegotiated() {
+ QuicClientSessionBase::OnConfigNegotiated();
+ if (stream_factory_ && config()->HasReceivedAlternateServerAddress()) {
+ // Server has sent an alternate address to connect to.
+ stream_factory_->MigrateSessionToNewSocket(
+ this, config()->ReceivedAlternateServerAddress(),
+ NetworkChangeNotifier::kInvalidNetworkHandle, net_log_, nullptr);
+ }
+}
+
void QuicChromiumClientSession::OnCryptoHandshakeEvent(
CryptoHandshakeEvent event) {
if (stream_factory_ && event == HANDSHAKE_CONFIRMED &&

Powered by Google App Engine
This is Rietveld 408576698