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

Unified Diff: net/quic/quic_client_session.cc

Issue 1208933004: QUIC - disable QUIC under recent pathological connection errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move dead code out of OnHandshakeConfirmed to where it will actually work (spotted by Ryan). 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
Index: net/quic/quic_client_session.cc
diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc
index 57a5393d734e359f50ef96f0b2fe6ccf6965f1f1..05e1e935714fb0ace96508c64e9d3dc3aa355420 100644
--- a/net/quic/quic_client_session.cc
+++ b/net/quic/quic_client_session.cc
@@ -184,6 +184,7 @@ QuicClientSession::QuicClientSession(
dns_resolution_end_time_(dns_resolution_end_time),
logger_(new QuicConnectionLogger(this, connection_description, net_log_)),
going_away_(false),
+ disabled_reason_(QUIC_DISABLED_NOT),
weak_factory_(this) {
crypto_stream_.reset(
crypto_client_stream_factory
@@ -676,6 +677,7 @@ void QuicClientSession::OnConnectionClosed(QuicErrorCode error,
GetNumOpenStreams());
if (IsCryptoHandshakeConfirmed()) {
if (GetNumOpenStreams() > 0) {
+ disabled_reason_ = QUIC_DISABLED_TIMEOUT_WITH_OPEN_STREAMS;
UMA_HISTOGRAM_BOOLEAN(
"Net.QuicSession.TimedOutWithOpenStreams.HasUnackedPackets",
connection()->sent_packet_manager().HasUnackedPackets());
@@ -722,6 +724,8 @@ void QuicClientSession::OnConnectionClosed(QuicErrorCode error,
"Net.QuicSession.ConnectionClose.HandshakeFailureUnknown.QuicError",
error);
}
+ } else if (error == QUIC_PUBLIC_RESET) {
+ disabled_reason_ = QUIC_DISABLED_PUBLIC_RESET_POST_HANDSHAKE;
}
UMA_HISTOGRAM_SPARSE_SLOWLY("Net.QuicSession.QuicVersion",

Powered by Google App Engine
This is Rietveld 408576698