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

Unified Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2932513004: Throttle HttpStreamFactoryImpl::Job to HTTP/2-supported servers (Closed)
Patch Set: self Created 3 years, 6 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
Index: net/http/http_stream_factory_impl_job_controller.cc
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index 69209d4e4f8ef04c10442616f089adf27d079e6b..39671f774a30b11de03b6f809a3051531761a598 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -621,6 +621,13 @@ void HttpStreamFactoryImpl::JobController::
RemoveRequestFromSpdySessionRequestMap() {
// TODO(xunjieli): Use a DCHECK once https://crbug.com/718576 is fixed.
CHECK(request_);
+ if (!request_->HasSpdySessionKey())
+ return;
+ // If the request failed or canceled, open the floodgate to resume all
+ // requests.
+ session_->spdy_session_pool()->ResumeAllPendingRequests(
+ request_->GetSpdySessionKey());
+
session_->spdy_session_pool()->RemoveRequestFromSpdySessionRequestMap(
request_);
}

Powered by Google App Engine
This is Rietveld 408576698