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

Side by Side Diff: net/quic/core/quic_connection.cc

Issue 2349373002: Only close the QUIC connection after 5RTOs on the client side when the (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_connection.h" 5 #include "net/quic/core/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 if (config.HasClientSentConnectionOption(kAKD3, perspective_)) { 368 if (config.HasClientSentConnectionOption(kAKD3, perspective_)) {
369 ack_mode_ = ACK_DECIMATION; 369 ack_mode_ = ACK_DECIMATION;
370 ack_decimation_delay_ = kShortAckDecimationDelay; 370 ack_decimation_delay_ = kShortAckDecimationDelay;
371 } 371 }
372 if (config.HasClientSentConnectionOption(kAKD4, perspective_)) { 372 if (config.HasClientSentConnectionOption(kAKD4, perspective_)) {
373 ack_mode_ = ACK_DECIMATION_WITH_REORDERING; 373 ack_mode_ = ACK_DECIMATION_WITH_REORDERING;
374 ack_decimation_delay_ = kShortAckDecimationDelay; 374 ack_decimation_delay_ = kShortAckDecimationDelay;
375 } 375 }
376 if (config.HasClientSentConnectionOption(k5RTO, perspective_)) { 376 if (config.HasClientSentConnectionOption(k5RTO, perspective_)) {
377 close_connection_after_five_rtos_ = true; 377 if (perspective_ == Perspective::IS_CLIENT ||
378 !FLAGS_quic_only_5rto_client_side) {
379 close_connection_after_five_rtos_ = true;
380 }
378 } 381 }
379 } 382 }
380 383
381 void QuicConnection::OnSendConnectionState( 384 void QuicConnection::OnSendConnectionState(
382 const CachedNetworkParameters& cached_network_params) { 385 const CachedNetworkParameters& cached_network_params) {
383 if (debug_visitor_ != nullptr) { 386 if (debug_visitor_ != nullptr) {
384 debug_visitor_->OnSendConnectionState(cached_network_params); 387 debug_visitor_->OnSendConnectionState(cached_network_params);
385 } 388 }
386 } 389 }
387 390
(...skipping 2135 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 2526
2524 void QuicConnection::CheckIfApplicationLimited() { 2527 void QuicConnection::CheckIfApplicationLimited() {
2525 if (queued_packets_.empty() && 2528 if (queued_packets_.empty() &&
2526 !sent_packet_manager_->HasPendingRetransmissions() && 2529 !sent_packet_manager_->HasPendingRetransmissions() &&
2527 !visitor_->WillingAndAbleToWrite()) { 2530 !visitor_->WillingAndAbleToWrite()) {
2528 sent_packet_manager_->OnApplicationLimited(); 2531 sent_packet_manager_->OnApplicationLimited();
2529 } 2532 }
2530 } 2533 }
2531 2534
2532 } // namespace net 2535 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698