Index: net/tools/quic/quic_dispatcher.cc |
diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc |
index c52f95c9a78e434ea04a99169fcd12033bef3c20..42287108ba2b1cbaebc68968bab3d0dde5de1c2f 100644 |
--- a/net/tools/quic/quic_dispatcher.cc |
+++ b/net/tools/quic/quic_dispatcher.cc |
@@ -21,12 +21,6 @@ namespace tools { |
using std::make_pair; |
using base::StringPiece; |
-// The threshold size for the session map, over which the dispatcher will start |
-// sending stateless rejects (SREJ), rather than stateful rejects (REJ) to |
-// clients who support them. If -1, stateless rejects will not be sent. If 0, |
-// the server will only send stateless rejects to clients who support them. |
-int32 FLAGS_quic_session_map_threshold_for_stateless_rejects = -1; |
- |
namespace { |
// An alarm that informs the QuicDispatcher to delete old sessions. |
@@ -298,6 +292,9 @@ void QuicDispatcher::OnUnauthenticatedHeader(const QuicPacketHeader& header) { |
// Create a session and process the packet. |
QuicServerSession* session = |
CreateQuicSession(connection_id, current_client_address_); |
+ if (FLAGS_enable_quic_stateless_reject_support) { |
+ session->set_use_stateless_rejects_if_peer_supported(true); |
+ } |
DVLOG(1) << "Created new session for " << connection_id; |
session_map_.insert(std::make_pair(connection_id, session)); |
session->connection()->ProcessUdpPacket( |
@@ -462,12 +459,6 @@ QuicServerSession* QuicDispatcher::CreateQuicSession( |
QuicServerSession* session = |
new QuicServerSession(config_, connection, this, crypto_config_); |
session->Initialize(); |
- if (FLAGS_quic_session_map_threshold_for_stateless_rejects != -1 && |
- session_map_.size() >= |
- static_cast<size_t>( |
- FLAGS_quic_session_map_threshold_for_stateless_rejects)) { |
- session->set_use_stateless_rejects_if_peer_supported(true); |
- } |
return session; |
} |