OLD | NEW |
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/spdy/spdy_session.h" | 5 #include "net/spdy/spdy_session.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 "Net.SpdyFrameStreamAndSessionFlowControlState", | 789 "Net.SpdyFrameStreamAndSessionFlowControlState", |
790 frame_flow_control_state, | 790 frame_flow_control_state, |
791 SEND_STALLED_BY_STREAM_AND_SESSION + 1); | 791 SEND_STALLED_BY_STREAM_AND_SESSION + 1); |
792 } | 792 } |
793 | 793 |
794 // Obey send window size of the stream if stream flow control is | 794 // Obey send window size of the stream if stream flow control is |
795 // enabled. | 795 // enabled. |
796 if (flow_control_state_ >= FLOW_CONTROL_STREAM) { | 796 if (flow_control_state_ >= FLOW_CONTROL_STREAM) { |
797 if (send_stalled_by_stream) { | 797 if (send_stalled_by_stream) { |
798 stream->set_send_stalled_by_flow_control(true); | 798 stream->set_send_stalled_by_flow_control(true); |
| 799 // Even though we're currently stalled only by the stream, we |
| 800 // might end up being stalled by the session also. |
| 801 QueueSendStalledStream(stream); |
799 net_log().AddEvent( | 802 net_log().AddEvent( |
800 NetLog::TYPE_SPDY_SESSION_STREAM_STALLED_BY_STREAM_SEND_WINDOW, | 803 NetLog::TYPE_SPDY_SESSION_STREAM_STALLED_BY_STREAM_SEND_WINDOW, |
801 NetLog::IntegerCallback("stream_id", stream_id)); | 804 NetLog::IntegerCallback("stream_id", stream_id)); |
802 return scoped_ptr<SpdyBuffer>(); | 805 return scoped_ptr<SpdyBuffer>(); |
803 } | 806 } |
804 | 807 |
805 effective_len = std::min(effective_len, stream->send_window_size()); | 808 effective_len = std::min(effective_len, stream->send_window_size()); |
806 } | 809 } |
807 | 810 |
808 // Obey send window size of the session if session flow control is | 811 // Obey send window size of the session if session flow control is |
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2404 if (!queue->empty()) { | 2407 if (!queue->empty()) { |
2405 SpdyStreamId stream_id = queue->front(); | 2408 SpdyStreamId stream_id = queue->front(); |
2406 queue->pop_front(); | 2409 queue->pop_front(); |
2407 return stream_id; | 2410 return stream_id; |
2408 } | 2411 } |
2409 } | 2412 } |
2410 return 0; | 2413 return 0; |
2411 } | 2414 } |
2412 | 2415 |
2413 } // namespace net | 2416 } // namespace net |
OLD | NEW |