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

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: jana's comments 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
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/quic/chromium/quic_http_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ba6c37c3c5faa43607fac245ee8ce90dc5dfccfb 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,18 @@ void QuicChromiumClientSession::OnConnectionClosed(
}
}
- if (!IsCryptoHandshakeConfirmed()) {
+ if (IsCryptoHandshakeConfirmed()) {
+ // QUIC connections should not timeout while there are open streams,
+ // since PING frames are sent to prevent timeouts. If, however, the
+ // connection timed out with open streams then QUIC traffic has become
+ // blackholed. Alternatively, if too many retransmission timeouts occur
+ // then QUIC traffic has become blackholed.
+ if (stream_factory_ &&
+ (error == QUIC_TOO_MANY_RTOS || (error == QUIC_NETWORK_IDLE_TIMEOUT &&
+ GetNumOpenOutgoingStreams() > 0))) {
+ stream_factory_->OnBlackholeAfterHandshakeConfirmed(this);
+ }
+ } else {
if (error == QUIC_PUBLIC_RESET) {
RecordHandshakeFailureReason(HANDSHAKE_FAILURE_PUBLIC_RESET);
} else if (connection()->GetStats().packets_received == 0) {
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/quic/chromium/quic_http_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698