mirror of https://github.com/aria2/aria2
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.ccpull/1/head
parent
60e3e46c52
commit
2764b6739d
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
||||
2009-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed the bug that slow server is not knocked down in favor of
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue