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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 989273005: Add MarkAlternativeServiceRecentlyBroken. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and nits. Created 5 years, 9 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_manager.cc ('k') | no next file » | 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 b654ef07bad4b849d8468f58e2f32a7a1cbcea6f..a36449099a8a332654519062fed8f4f452f0cfc8 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -1319,36 +1319,21 @@ void QuicStreamFactory::ProcessGoingAwaySession(
if (!session_was_active)
return;
- const HostPortPair& server = server_id.host_port_pair();
- // Don't try to change the alternate-protocol state, if the
- // alternate-protocol state is unknown.
- const AlternateProtocolInfo alternate =
- http_server_properties_->GetAlternateProtocol(server);
- if (alternate.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL)
- return;
-
// TODO(rch): In the special case where the session has received no
// packets from the peer, we should consider blacklisting this
// differently so that we still race TCP but we don't consider the
// session connected until the handshake has been confirmed.
HistogramBrokenAlternateProtocolLocation(
BROKEN_ALTERNATE_PROTOCOL_LOCATION_QUIC_STREAM_FACTORY);
- DCHECK_EQ(QUIC, alternate.protocol);
// Since the session was active, there's no longer an
- // HttpStreamFactoryImpl::Job running which can mark it broken, unless the
- // TCP job also fails. So to avoid not using QUIC when we otherwise could,
- // we mark it as broken, and then immediately re-enable it. This leaves
- // QUIC as "recently broken" which means that 0-RTT will be disabled but
- // we'll still race.
- http_server_properties_->SetBrokenAlternateProtocol(server);
- http_server_properties_->ClearAlternateProtocol(server);
- http_server_properties_->SetAlternateProtocol(
- server, alternate.port, alternate.protocol, 1);
- DCHECK_EQ(QUIC,
- http_server_properties_->GetAlternateProtocol(server).protocol);
- DCHECK(http_server_properties_->WasAlternateProtocolRecentlyBroken(
- server));
+ // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
+ // job also fails. So to avoid not using QUIC when we otherwise could, we mark
+ // it as recently broken, which means that 0-RTT will be disabled but we'll
+ // still race.
+ const HostPortPair& server = server_id.host_port_pair();
+ http_server_properties_->MarkAlternativeServiceRecentlyBroken(
+ AlternativeService(QUIC, server.host(), server.port()));
}
} // namespace net
« no previous file with comments | « net/http/http_server_properties_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698