diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-23 03:38:23 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-23 03:38:23 +0000 |
commit | 19ec8a7de37bc359e17788307777ff537e5e657f (patch) | |
tree | 4a27f8f3831b71133ad1acd2d5b5520a451b7996 /net/spdy/spdy_session.h | |
parent | de6251d099e919502c13dddd01492ad1831d2c5f (diff) | |
download | chromium_src-19ec8a7de37bc359e17788307777ff537e5e657f.zip chromium_src-19ec8a7de37bc359e17788307777ff537e5e657f.tar.gz chromium_src-19ec8a7de37bc359e17788307777ff537e5e657f.tar.bz2 |
Fix bug where pushed SPDY streams were never actually closed.
The fix uncovers a few things. Previously, when we had an unclaimed
push stream, we'd leave it as an "active" stream, even if the EOF had
already been received on that stream. I changed it so that the push
stream is removed from the active stream as soon as it is inactive,
but it remains on the unclaimed_pushed_streams list. This seems more
correct.
The hardest part of the test was getting the test to verify the fix.
To verify the fix, I modified the Push tests so that we leave the
session open (e.g. terminate the list of reads with an ERR_IO_PENDING
rather than an EOF so that it sits open), which gives us the opportunity
to check if there are active streams left on the session when we
completed the test. If so, then we'll pop an error.
BUG=52898
TEST=Updated existing tests.
Review URL: http://codereview.chromium.org/3108038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.h')
-rw-r--r-- | net/spdy/spdy_session.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h index 6fe8d37..480f9ad 100644 --- a/net/spdy/spdy_session.h +++ b/net/spdy/spdy_session.h @@ -162,6 +162,13 @@ class SpdySession : public base::RefCounted<SpdySession>, void set_in_session_pool(bool val) { in_session_pool_ = val; } + // Access to the number of active and pending streams. These are primarily + // available for testing and diagnostics. + size_t num_active_streams() const { return active_streams_.size(); } + size_t num_unclaimed_pushed_streams() const { + return unclaimed_pushed_streams_.size(); + } + private: friend class base::RefCounted<SpdySession>; FRIEND_TEST_ALL_PREFIXES(SpdySessionTest, GetActivePushStream); |