| 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 2e0dffb8b400b475fcb6e3c5233680fcdeaf8095..b9aa8a8132c319e4dd33f17e41c102b9ce15ba56 100644
|
| --- a/net/http/http_stream_factory_impl_job_controller.cc
|
| +++ b/net/http/http_stream_factory_impl_job_controller.cc
|
| @@ -27,6 +27,10 @@
|
|
|
| namespace net {
|
|
|
| +// The maximum time to wait for the alternate job to complete before resuming
|
| +// the main job.
|
| +const int kMaxDelayTimeForMainJobSecs = 3;
|
| +
|
| // Returns parameters associated with the delay of the HTTP stream job.
|
| std::unique_ptr<base::Value> NetLogHttpStreamJobDelayCallback(
|
| base::TimeDelta delay,
|
| @@ -638,8 +642,10 @@ const NetLogWithSource* HttpStreamFactoryImpl::JobController::GetNetLog(
|
|
|
| void HttpStreamFactoryImpl::JobController::MaybeSetWaitTimeForMainJob(
|
| const base::TimeDelta& delay) {
|
| - if (main_job_is_blocked_)
|
| - main_job_wait_time_ = delay;
|
| + if (main_job_is_blocked_) {
|
| + main_job_wait_time_ = std::min(
|
| + delay, base::TimeDelta::FromSeconds(kMaxDelayTimeForMainJobSecs));
|
| + }
|
| }
|
|
|
| WebSocketHandshakeStreamBase::CreateHelper* HttpStreamFactoryImpl::
|
|
|