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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 560913002: Fix a bug when a QUIC session is closed during the call to InitializeSession. This seems to be able… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 6 years, 3 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 51b3b9df919ffbcd05ecdad72cd305e964c5b379..404ed1935b70f21f5e74960ee84adddeae61f129 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -888,9 +888,17 @@ int QuicStreamFactory::CreateSession(
server_info.Pass(), config,
base::MessageLoop::current()->message_loop_proxy().get(),
net_log.net_log());
+ all_sessions_[*session] = server_id; // owning pointer
(*session)->InitializeSession(server_id, &crypto_config_,
quic_crypto_client_stream_factory_);
- all_sessions_[*session] = server_id; // owning pointer
+ bool closed_during_initialize = !ContainsKey(all_sessions_, *session);
+ UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.ClosedDuringInitializeSession",
+ closed_during_initialize);
+ if (closed_during_initialize) {
+ DLOG(DFATAL) << "Session closed during initialize";
+ *session = NULL;
+ return ERR_CONNECTION_CLOSED;
+ }
return OK;
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698