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

Side by Side Diff: net/quic/quic_session.cc

Issue 639713007: Fix a QUIC flow control bug where a stream is flow control blocked when (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Set_server_idle_timeout_76821863_2
Patch Set: Created 6 years, 2 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 | « net/quic/quic_flow_controller.cc ('k') | net/quic/quic_session_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/quic_session.h" 5 #include "net/quic/quic_session.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/crypto/proof_verifier.h" 8 #include "net/quic/crypto/proof_verifier.h"
9 #include "net/quic/quic_connection.h" 9 #include "net/quic/quic_connection.h"
10 #include "net/quic/quic_flags.h" 10 #include "net/quic/quic_flags.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 return; 526 return;
527 } 527 }
528 528
529 // Inform all existing streams about the new window. 529 // Inform all existing streams about the new window.
530 if (connection_->version() >= QUIC_VERSION_21) { 530 if (connection_->version() >= QUIC_VERSION_21) {
531 GetCryptoStream()->flow_controller()->UpdateSendWindowOffset(new_window); 531 GetCryptoStream()->flow_controller()->UpdateSendWindowOffset(new_window);
532 headers_stream_->flow_controller()->UpdateSendWindowOffset(new_window); 532 headers_stream_->flow_controller()->UpdateSendWindowOffset(new_window);
533 } 533 }
534 for (DataStreamMap::iterator it = stream_map_.begin(); 534 for (DataStreamMap::iterator it = stream_map_.begin();
535 it != stream_map_.end(); ++it) { 535 it != stream_map_.end(); ++it) {
536 it->second->flow_controller()->UpdateSendWindowOffset(new_window); 536 if (it->second->flow_controller()->UpdateSendWindowOffset(new_window)) {
537 it->second->OnCanWrite();
538 }
537 } 539 }
538 } 540 }
539 541
540 void QuicSession::OnNewSessionFlowControlWindow(uint32 new_window) { 542 void QuicSession::OnNewSessionFlowControlWindow(uint32 new_window) {
541 if (new_window < kDefaultFlowControlSendWindow) { 543 if (new_window < kDefaultFlowControlSendWindow) {
542 LOG(ERROR) 544 LOG(ERROR)
543 << "Peer sent us an invalid session flow control send window: " 545 << "Peer sent us an invalid session flow control send window: "
544 << new_window << ", below default: " << kDefaultFlowControlSendWindow; 546 << new_window << ", below default: " << kDefaultFlowControlSendWindow;
545 if (connection_->connected()) { 547 if (connection_->connected()) {
546 connection_->SendConnectionClose(QUIC_FLOW_CONTROL_INVALID_WINDOW); 548 connection_->SendConnectionClose(QUIC_FLOW_CONTROL_INVALID_WINDOW);
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 778
777 // Disable stream level flow control based on negotiated version. Streams may 779 // Disable stream level flow control based on negotiated version. Streams may
778 // have been created with a different version. 780 // have been created with a different version.
779 if (version < QUIC_VERSION_21) { 781 if (version < QUIC_VERSION_21) {
780 GetCryptoStream()->flow_controller()->Disable(); 782 GetCryptoStream()->flow_controller()->Disable();
781 headers_stream_->flow_controller()->Disable(); 783 headers_stream_->flow_controller()->Disable();
782 } 784 }
783 } 785 }
784 786
785 } // namespace net 787 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_flow_controller.cc ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698