diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-01-16 18:12:14 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-01-16 18:12:14 +0900 |
| commit | 63fe7874daa45ad32475b2e9f04087ecb7621347 (patch) | |
| tree | ee81dabe89c6de9c7cfcb46fa0d5d6c8be0ee1d7 /src/AbstractCommand.cc | |
| parent | b2f27e6548ec5f13a0f5776612cb512cb0d30d4e (diff) | |
Handle the situation when remote server returns Connection: close
after several pipelined requests.
We call Request::setMaxPipelinedRequest(1) if Connection: close is
received. Also call Request::supportsPersistentConnection(true) and
Request::setMaxPipelinedRequest(1) when closing the connection.
Diffstat (limited to 'src/AbstractCommand.cc')
| -rw-r--r-- | src/AbstractCommand.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc index 5a15e86a..b4e5ee2f 100644 --- a/src/AbstractCommand.cc +++ b/src/AbstractCommand.cc @@ -347,6 +347,12 @@ bool AbstractCommand::prepareForRetry(time_t wait) { getSegmentMan()->cancelSegment(getCuid()); } if(req_) { + // Reset persistentConnection and maxPipelinedRequest to handle + // the situation where remote server returns Connection: close + // after several pipelined requests. + req_->supportsPersistentConnection(true); + req_->setMaxPipelinedRequest(1); + fileEntry_->poolRequest(req_); A2_LOG_DEBUG(fmt("CUID#%lld - Pooling request URI=%s", getCuid(), req_->getUri().c_str())); |
