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

Unified Diff: net/tools/quic/quic_dispatcher.cc

Issue 1421853006: Landing Recent QUIC changes until: Fri Oct 30 22:23:58 2015 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 5 years, 1 month 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/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_dispatcher.cc
diff --git a/net/tools/quic/quic_dispatcher.cc b/net/tools/quic/quic_dispatcher.cc
index 47d47fff818dbfafd21bf314c2f5da1c641a4e1f..bb4bd88ae9dc69296b3c64d7f4ee028efb9d111d 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.
@@ -209,7 +203,7 @@ void QuicDispatcher::ProcessPacket(const IPEndPoint& server_address,
current_packet_ = &packet;
// ProcessPacket will cause the packet to be dispatched in
// OnUnauthenticatedPublicHeader, or sent to the time wait list manager
- // in OnAuthenticatedHeader.
+ // in OnUnauthenticatedHeader.
framer_.ProcessPacket(packet);
// TODO(rjshade): Return a status describing if/why a packet was dropped,
// and log somehow. Maybe expose as a varz.
@@ -359,13 +353,15 @@ QuicDispatcher::QuicPacketFate QuicDispatcher::ValidityChecks(
void QuicDispatcher::CleanUpSession(SessionMap::iterator it,
bool should_close_statelessly) {
QuicConnection* connection = it->second->connection();
- QuicEncryptedPacket* connection_close_packet =
- connection->ReleaseConnectionClosePacket();
+
write_blocked_list_.erase(connection);
- DCHECK(!should_close_statelessly || !connection_close_packet);
+ if (should_close_statelessly) {
+ DCHECK(connection->termination_packets() != nullptr &&
+ !connection->termination_packets()->empty());
+ }
time_wait_list_manager_->AddConnectionIdToTimeWait(
it->first, connection->version(), should_close_statelessly,
- connection_close_packet);
+ connection->termination_packets());
session_map_.erase(it);
}
@@ -460,12 +456,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;
}
« no previous file with comments | « net/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698