mirror of https://github.com/aria2/aria2
2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that causes aria2 not to finish download. BUG#1855875. I could reproduce this bug in following procedure: 1. Stop the download at the very beginning(1% or 100KB downloaded). 2. Restart aria2. 3. You see the download stopped around 99%. * src/HttpResponseCommand.cc (handleDefaultEncoding) * src/StreamFileAllocationEntry.cc: Removed the timeout handling. If timeout is reached, then _nextCommand is unused and it may contains segments and they won't be canceled. Actually, timeout is not needed here because if the server dropped connection, then retry is made.pull/1/head
parent
286f34cb3f
commit
ccd4a35096
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed the bug that causes aria2 not to finish download. BUG#1855875.
|
||||
I could reproduce this bug in following procedure:
|
||||
1. Stop the download at the very beginning(1% or 100KB downloaded).
|
||||
2. Restart aria2.
|
||||
3. You see the download stopped around 99%.
|
||||
* src/HttpResponseCommand.cc (handleDefaultEncoding)
|
||||
* src/StreamFileAllocationEntry.cc: Removed the timeout handling.
|
||||
If timeout is reached, then _nextCommand is unused and it may contains
|
||||
segments and they won't be canceled. Actually, timeout is not needed
|
||||
here because if the server dropped connection, then retry is made.
|
||||
|
||||
2007-12-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Added uTorrent compatible Peer Exchange.
|
||||
|
|
|
@ -139,6 +139,8 @@ bool HttpResponseCommand::handleDefaultEncoding(const HttpResponseHandle& httpRe
|
|||
SegmentHandle segment = _requestGroup->getSegmentMan()->getSegment(cuid, 0);
|
||||
if(!segment.isNull() && segment->getPositionToWrite() == 0) {
|
||||
command = createHttpDownloadCommand(httpResponse);
|
||||
} else {
|
||||
_requestGroup->getSegmentMan()->cancelSegment(cuid);
|
||||
}
|
||||
prepareForNextAction(command);
|
||||
e->noWait = true;
|
||||
|
|
|
@ -54,8 +54,7 @@ StreamFileAllocationEntry::~StreamFileAllocationEntry() {}
|
|||
Commands StreamFileAllocationEntry::prepareForNextAction(DownloadEngine* e)
|
||||
{
|
||||
Commands commands;
|
||||
if(_timer.difference() <= e->option->getAsInt(PREF_DIRECT_DOWNLOAD_TIMEOUT) &&
|
||||
_nextCommand) {
|
||||
if(_nextCommand) {
|
||||
commands.push_back(popNextCommand());
|
||||
// try remaining uris
|
||||
Commands streamCommands = _requestGroup->createNextCommandWithAdj(e, -1);
|
||||
|
|
Loading…
Reference in New Issue