Fixed the bug that commands are created more than the number of pieces. * src/RequestGroup.cc
@@ -1,3 +1,8 @@
+2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
+
+ Fixed the bug that commands are created more than the number of pieces.
+ * src/RequestGroup.cc
2008-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed infinite loop bug in FTP when SIZE command failed.
@@ -491,9 +491,9 @@ void RequestGroup::createNextCommandWithAdj(std::deque<Command*>& commands,
} else {
numCommand = _numConcurrentCommand;
}
- numCommand += numAdj;
numCommand = std::min(static_cast<int>(_downloadContext->getNumPieces()),
numCommand);
+ numCommand += numAdj;
if(numCommand > 0) {
createNextCommand(commands, e, numCommand);