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); |