summaryrefslogtreecommitdiff
path: root/src/DownloadCommand.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/DownloadCommand.cc')
-rw-r--r--src/DownloadCommand.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/DownloadCommand.cc b/src/DownloadCommand.cc
index 8033a224..8bc3dbc7 100644
--- a/src/DownloadCommand.cc
+++ b/src/DownloadCommand.cc
@@ -229,9 +229,12 @@ bool DownloadCommand::executeInternal() {
#else // !ENABLE_MESSAGE_DIGEST
_requestGroup->getSegmentMan()->completeSegment(cuid, segment);
#endif // !ENABLE_MESSAGE_DIGEST
+ } else {
+ // If segment is not cacnel here, in the next pipelining
+ // request, aria2 requests bad range
+ // [FileEntry->getLastOffset(), FileEntry->getLastOffset())
+ _requestGroup->getSegmentMan()->cancelSegment(cuid, segment);
}
-
-
checkLowestDownloadSpeed();
// this unit is going to download another segment.
return prepareForNextSegment();