diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-05 07:10:44 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-05 07:10:44 +0000 |
commit | 1d969bb4c227fcea5628724491795d491e129d99 (patch) | |
tree | f91a13d9141c7251480ccf45e5134ca656231011 /net/spdy | |
parent | bff34e7ac2eef73355dd06e16f1752efc74e372e (diff) | |
download | chromium_src-1d969bb4c227fcea5628724491795d491e129d99.zip chromium_src-1d969bb4c227fcea5628724491795d491e129d99.tar.gz chromium_src-1d969bb4c227fcea5628724491795d491e129d99.tar.bz2 |
I investigated the TODO, and decided that the current logic is right.
I couldn't find a way to make it cleaner that didn't introduce a new race.
BUG=none
TEST=n/a
TBR=cbentzel@chromium.org
Review URL: http://codereview.chromium.org/3322014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58602 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r-- | net/spdy/spdy_session.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index ba8755c..52322c1 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -520,10 +520,12 @@ int SpdySession::WriteStreamData(spdy::SpdyStreamId stream_id, // Obey send window size of the stream if flow control is enabled. if (use_flow_control_) { if (stream->send_window_size() <= 0) { - // TODO(mbelshe): Consider getting rid of set_stalled_by_flow_control() - // and have the stream provide is_stalled(). Right now - // we mark as flow controlled from the SpdySession, and - // unmark flow controlled from the SpdyStream. + // Because we queue frames onto the session, it is possible that + // a stream was not flow controlled at the time it attempted the + // write, but when we go to fulfill the write, it is now flow + // controlled. This is why we need the session to mark the stream + // as stalled - because only the session knows for sure when the + // stall occurs. stream->set_stalled_by_flow_control(true); net_log().AddEvent(NetLog::TYPE_SPDY_SESSION_STALLED_ON_SEND_WINDOW, new NetLogIntegerParameter("stream_id", stream_id)); |