diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 15:44:26 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 15:44:26 +0000 |
commit | 044dcc53e97c2628215f62dd6858a4aaddb4b06b (patch) | |
tree | d934244ad2b576a5ebd2cb0db23463bc702110b8 /net/spdy/spdy_session.cc | |
parent | e50e6b77c179aee92852fcfdc73f66741f368539 (diff) | |
download | chromium_src-044dcc53e97c2628215f62dd6858a4aaddb4b06b.zip chromium_src-044dcc53e97c2628215f62dd6858a4aaddb4b06b.tar.gz chromium_src-044dcc53e97c2628215f62dd6858a4aaddb4b06b.tar.bz2 |
Fix case where we close a stream due to socket errors when it is currently
a pending create stream.
The problem was that the socket error would arrive on the SpdySession, which
would initiate cleanup of the pendng create streams for that session. In the
callback to the stream, the stream would notify the transaction, which would
delete itself, and that would cause a callback into the SpdySession to
clear that specific pending create stream (via CancelPendingCreateStreams).
BUG=52901,55795
TEST=SpdyNetworkTransactionTest.ThreeGetsWithMaxConcurrentSocketClose
Review URL: http://codereview.chromium.org/3400009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59794 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.cc')
-rw-r--r-- | net/spdy/spdy_session.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index 941569b..6b80de3 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -390,14 +390,14 @@ void SpdySession::ProcessPendingCreateStreams() { bool no_pending_create_streams = true; for (int i = 0;i < NUM_PRIORITIES;++i) { if (!create_stream_queues_[i].empty()) { - PendingCreateStream& pending_create = create_stream_queues_[i].front(); + PendingCreateStream pending_create = create_stream_queues_[i].front(); + create_stream_queues_[i].pop(); no_pending_create_streams = false; int error = CreateStreamImpl(*pending_create.url, pending_create.priority, pending_create.spdy_stream, *pending_create.stream_net_log); pending_create.callback->Run(error); - create_stream_queues_[i].pop(); break; } } @@ -412,10 +412,10 @@ void SpdySession::CancelPendingCreateStreams( PendingCreateStreamQueue tmp; // Make a copy removing this trans while (!create_stream_queues_[i].empty()) { - PendingCreateStream& pending_create = create_stream_queues_[i].front(); + PendingCreateStream pending_create = create_stream_queues_[i].front(); + create_stream_queues_[i].pop(); if (pending_create.spdy_stream != spdy_stream) tmp.push(pending_create); - create_stream_queues_[i].pop(); } // Now copy it back while (!tmp.empty()) { @@ -866,9 +866,9 @@ void SpdySession::CloseAllStreams(net::Error status) { for (int i = 0;i < NUM_PRIORITIES;++i) { while (!create_stream_queues_[i].empty()) { - PendingCreateStream& pending_create = create_stream_queues_[i].front(); - pending_create.callback->Run(ERR_ABORTED); + PendingCreateStream pending_create = create_stream_queues_[i].front(); create_stream_queues_[i].pop(); + pending_create.callback->Run(ERR_ABORTED); } } |