diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-11-20 15:27:10 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-11-20 15:27:10 +0000 |
| commit | 2764b6739d0b0414cf0ce31c2f8db5b24f68b75e (patch) | |
| tree | 9204135f750b4d052c6383ea18bc7eac6fbbce08 /src/CreateRequestCommand.cc | |
| parent | 60e3e46c527fb567522f3fff428b6760b9273884 (diff) | |
2009-11-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Cancel segment in prepareForRetry() because there is a chance that
the command has segments.
* src/CreateRequestCommand.cc
Diffstat (limited to 'src/CreateRequestCommand.cc')
| -rw-r--r-- | src/CreateRequestCommand.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/CreateRequestCommand.cc b/src/CreateRequestCommand.cc index 81003541..f23bd192 100644 --- a/src/CreateRequestCommand.cc +++ b/src/CreateRequestCommand.cc @@ -108,6 +108,9 @@ bool CreateRequestCommand::prepareForRetry(time_t wait) // called repeatedly. This means that newly created // CreateRequestCommand is deleted one second later: This is not // efficient. For this reason, reuse current CreateRequestCommand. + if(!_requestGroup->getPieceStorage().isNull()) { + _requestGroup->getSegmentMan()->cancelSegment(cuid); + } logger->debug("CUID#%d - Reusing CreateRequestCommand", cuid); SleepCommand* scom = new SleepCommand(cuid, e, _requestGroup, this, wait); e->commands.push_back(scom); |
