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

Unified Diff: net/quic/chromium/quic_chromium_client_session.cc

Issue 2789093003: Mark QUIC broken when the network blackholes after the handshake (Closed)
Patch Set: Rename mark_quic_broken_when_network_suspected to mark_quic_broken_when_network_blackholes Created 3 years, 8 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/chromium/quic_chromium_client_session.cc
diff --git a/net/quic/chromium/quic_chromium_client_session.cc b/net/quic/chromium/quic_chromium_client_session.cc
index f58bd05a213a2e794e2b29629d4ccc00ced7a2d2..76a7343d35743723d4ead9c6fc43b0f9409d81b8 100644
--- a/net/quic/chromium/quic_chromium_client_session.cc
+++ b/net/quic/chromium/quic_chromium_client_session.cc
@@ -962,10 +962,6 @@ void QuicChromiumClientSession::OnConnectionClosed(
UMA_HISTOGRAM_COUNTS(
"Net.QuicSession.ConnectionClose.NumOpenStreams.TimedOut",
GetNumOpenOutgoingStreams());
- // Notify the factory the connection timed out with open streams.
- if (GetNumOpenOutgoingStreams() > 0 && stream_factory_) {
- stream_factory_->OnTimeoutWithOpenStreams();
- }
if (IsCryptoHandshakeConfirmed()) {
if (GetNumOpenOutgoingStreams() > 0) {
UMA_HISTOGRAM_BOOLEAN(
@@ -991,7 +987,13 @@ void QuicChromiumClientSession::OnConnectionClosed(
}
}
- if (!IsCryptoHandshakeConfirmed()) {
+ if (IsCryptoHandshakeConfirmed()) {
+ if (stream_factory_ &&
+ (error == QUIC_TOO_MANY_RTOS || (error == QUIC_NETWORK_IDLE_TIMEOUT &&
+ GetNumOpenOutgoingStreams() > 0))) {
+ stream_factory_->OnBlackholeAfterHandshakeConfirmed(this);
+ }
+ } else {
Jana 2017/04/07 21:59:29 Nice. I like the way you refactored code to get th
Ryan Hamilton 2017/04/07 22:37:20 Yay! Thanks. It took *way* too long for me to figu
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