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

Unified Diff: net/spdy/spdy_write_queue.cc

Issue 14232014: Correctly handle SPDY GOAWAY frames. (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 side-by-side diff with in-line comments
Download patch
« net/spdy/spdy_test_util_spdy3.cc ('K') | « net/spdy/spdy_write_queue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_write_queue.cc
diff --git a/net/spdy/spdy_write_queue.cc b/net/spdy/spdy_write_queue.cc
index 18ddc39bf8ec28bef9e37e31025b39e5c9d46d07..88c93c2aa8b066807049b845834dc3f826c7e344 100644
--- a/net/spdy/spdy_write_queue.cc
+++ b/net/spdy/spdy_write_queue.cc
@@ -99,4 +99,18 @@ void SpdyWriteQueue::Clear() {
}
}
+void SpdyWriteQueue::ClearAfter(SpdyStreamId last_good_stream_id) {
+ for (int i = 0; i < NUM_PRIORITIES; ++i) {
+ std::deque<PendingWrite>::iterator it = queue_[i].begin();
+ while (it != queue_[i].end()) {
+ if (it->stream->stream_id() > last_good_stream_id) {
+ delete it->frame_producer;
+ it = queue_[i].erase(it);
akalin 2013/04/17 21:14:20 unfortunately, deque::erase is O(n). Can you do so
Ryan Hamilton 2013/04/18 00:30:40 Done.
+ } else {
+ ++it;
+ }
+ }
+ }
+}
+
} // namespace net
« net/spdy/spdy_test_util_spdy3.cc ('K') | « net/spdy/spdy_write_queue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698