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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 14148007: [SPDY] Fix bug where a SPDY stream might not unstall properly in all cases (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | net/spdy/spdy_session_spdy3_unittest.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/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
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
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
OLDNEW
« no previous file with comments | « net/base/net_log_event_type_list.h ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698