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

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: Created 5 years, 6 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..4858bdf09cd402feed1eac06f62381140783ea6c 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),
+ epitaph_(QUIC_EPITAPH_RIP),
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) {
+ epitaph_ = QUIC_EPITAPH_TIMEOUT_STREAMS_OPEN;
UMA_HISTOGRAM_BOOLEAN(
"Net.QuicSession.TimedOutWithOpenStreams.HasUnackedPackets",
connection()->sent_packet_manager().HasUnackedPackets());
@@ -708,7 +710,11 @@ void QuicClientSession::OnConnectionClosed(QuicErrorCode error,
}
}
- if (!IsCryptoHandshakeConfirmed()) {
+ bool crypto_handshake_confirmed = IsCryptoHandshakeConfirmed();
+ if (error == QUIC_PUBLIC_RESET && crypto_handshake_confirmed) {
+ epitaph_ = QUIC_EPITAPH_PUBLIC_RESET_POST_HANDSHAKE;
+ }
+ if (!crypto_handshake_confirmed) {
if (error == QUIC_PUBLIC_RESET) {
RecordHandshakeFailureReason(HANDSHAKE_FAILURE_PUBLIC_RESET);
} else if (connection()->GetStats().packets_received == 0) {

Powered by Google App Engine
This is Rietveld 408576698