mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 22:17:38 +03:00
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
This commit is contained in:
parent
60e3e46c52
commit
2764b6739d
2 changed files with 9 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue