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

Unified Diff: net/spdy/spdy_stream.cc

Issue 9392030: SPDY Proxy - Bug fix to handle flow control (spdy/2.1) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.cc
===================================================================
--- net/spdy/spdy_stream.cc (revision 122116)
+++ net/spdy/spdy_stream.cc (working copy)
@@ -192,6 +192,10 @@
// By the time a read is isued, stream may become inactive.
if (!session_->IsStreamActive(stream_id_))
return;
+
+ if (!session_->is_flow_control_enabled())
+ return;
+
int32 new_window_size = recv_window_size_ + delta_window_size;
if (recv_window_size_ > 0)
DCHECK(new_window_size > 0);
@@ -207,6 +211,9 @@
void SpdyStream::DecreaseRecvWindowSize(int32 delta_window_size) {
DCHECK_GE(delta_window_size, 1);
+ if (!session_->is_flow_control_enabled())
+ return;
+
recv_window_size_ -= delta_window_size;
net_log_.AddEvent(
NetLog::TYPE_SPDY_STREAM_UPDATE_RECV_WINDOW,
@@ -333,8 +340,7 @@
return;
}
- if (session_->is_flow_control_enabled())
- DecreaseRecvWindowSize(length);
+ DecreaseRecvWindowSize(length);
// Track our bandwidth.
metrics_.RecordBytes(length);
« no previous file with comments | « net/spdy/spdy_proxy_client_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698