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

Unified Diff: net/tools/quic/quic_client.cc

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 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 | « net/tools/quic/quic_client.h ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client.cc
diff --git a/net/tools/quic/quic_client.cc b/net/tools/quic/quic_client.cc
index 52c4e2cfdde7152b3c67f30a606b83f607997415..ca87c2f58e107f7c6da143cc302f8e9d76aac782 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -178,14 +178,21 @@ bool QuicClient::StartConnect() {
DCHECK(!connected());
QuicPacketWriter* writer = CreateQuicPacketWriter();
- if (writer_.get() != writer) {
- writer_.reset(writer);
- }
session_.reset(new QuicClientSession(
config_,
- new QuicConnection(GenerateConnectionId(), server_address_, helper_.get(),
- writer_.get(), false, supported_versions_)));
+ new QuicConnection(GenerateConnectionId(),
+ server_address_,
+ helper_.get(),
+ writer,
+ false /* owns_writer */,
+ false /* is_server */,
+ supported_versions_)));
+ // Reset |writer_| after |session_| so that the old writer outlives the old
+ // session.
+ if (writer_.get() != writer) {
+ writer_.reset(writer);
+ }
session_->InitializeSession(server_id_, &crypto_config_);
return session_->CryptoConnect();
}
« no previous file with comments | « net/tools/quic/quic_client.h ('k') | net/tools/quic/quic_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698