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

Side by Side Diff: net/quic/reliable_quic_stream.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_session_test.cc ('k') | no next file » | 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/reliable_quic_stream.h" 5 #include "net/quic/reliable_quic_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/quic/iovector.h" 8 #include "net/quic/iovector.h"
9 #include "net/quic/quic_flow_controller.h" 9 #include "net/quic/quic_flow_controller.h"
10 #include "net/quic/quic_session.h" 10 #include "net/quic/quic_session.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 flow_controller_.bytes_consumed(); 472 flow_controller_.bytes_consumed();
473 AddBytesConsumed(bytes_to_consume); 473 AddBytesConsumed(bytes_to_consume);
474 } 474 }
475 475
476 void ReliableQuicStream::OnWindowUpdateFrame( 476 void ReliableQuicStream::OnWindowUpdateFrame(
477 const QuicWindowUpdateFrame& frame) { 477 const QuicWindowUpdateFrame& frame) {
478 if (!flow_controller_.IsEnabled()) { 478 if (!flow_controller_.IsEnabled()) {
479 DLOG(DFATAL) << "Flow control not enabled! " << version(); 479 DLOG(DFATAL) << "Flow control not enabled! " << version();
480 return; 480 return;
481 } 481 }
482
483 if (flow_controller_.UpdateSendWindowOffset(frame.byte_offset)) { 482 if (flow_controller_.UpdateSendWindowOffset(frame.byte_offset)) {
484 // We can write again! 483 // We can write again!
485 // TODO(rjshade): This does not respect priorities (e.g. multiple 484 // TODO(rjshade): This does not respect priorities (e.g. multiple
486 // outstanding POSTs are unblocked on arrival of 485 // outstanding POSTs are unblocked on arrival of
487 // SHLO with initial window). 486 // SHLO with initial window).
488 // As long as the connection is not flow control blocked, we can write! 487 // As long as the connection is not flow control blocked, we can write!
489 OnCanWrite(); 488 OnCanWrite();
490 } 489 }
491 } 490 }
492 491
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 534
536 bool ReliableQuicStream::IsFlowControlBlocked() { 535 bool ReliableQuicStream::IsFlowControlBlocked() {
537 if (flow_controller_.IsBlocked()) { 536 if (flow_controller_.IsBlocked()) {
538 return true; 537 return true;
539 } 538 }
540 return stream_contributes_to_connection_flow_control_ && 539 return stream_contributes_to_connection_flow_control_ &&
541 connection_flow_controller_->IsBlocked(); 540 connection_flow_controller_->IsBlocked();
542 } 541 }
543 542
544 } // namespace net 543 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698