2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Fixed the bug that prevents aria2 from stopping other than by 
pressing
	Ctrl-C in BitTorrent download. It is reproducible using 
--seed-time
	option. aria2 doesn't stop even after --seed-time is satisfied 
and
	continues to output blank lines in the console.
	* src/ReceiverMSEHandshakeCommand.cc
	* src/PeerReceiveHandshakeCommand.cc
	* src/PeerListenCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-02-23 15:37:47 +00:00
parent 88cd57f7a2
commit a1f0d44c9f
4 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,13 @@
2008-02-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that prevents aria2 from stopping other than by pressing
Ctrl-C in BitTorrent download. It is reproducible using --seed-time
option. aria2 doesn't stop even after --seed-time is satisfied and
continues to output blank lines in the console.
* src/ReceiverMSEHandshakeCommand.cc
* src/PeerReceiveHandshakeCommand.cc
* src/PeerListenCommand.cc
2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com> 2008-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Bump up version number to 0.13.0rc Bump up version number to 0.13.0rc

View File

@ -85,7 +85,7 @@ int32_t PeerListenCommand::bindPort(IntSequence& seq)
} }
bool PeerListenCommand::execute() { bool PeerListenCommand::execute() {
if(e->isHaltRequested() || e->_requestGroupMan->countRequestGroup() == 0) { if(e->isHaltRequested() || e->_requestGroupMan->downloadFinished()) {
return true; return true;
} }
for(int32_t i = 0; i < 3 && socket->isReadable(0); i++) { for(int32_t i = 0; i < 3 && socket->isReadable(0); i++) {

View File

@ -51,6 +51,7 @@
#include "Logger.h" #include "Logger.h"
#include "prefs.h" #include "prefs.h"
#include "Option.h" #include "Option.h"
#include "RequestGroupMan.h"
namespace aria2 { namespace aria2 {
@ -76,7 +77,7 @@ PeerReceiveHandshakeCommand::~PeerReceiveHandshakeCommand() {}
bool PeerReceiveHandshakeCommand::exitBeforeExecute() bool PeerReceiveHandshakeCommand::exitBeforeExecute()
{ {
return e->isHaltRequested(); return e->isHaltRequested() || e->_requestGroupMan->downloadFinished();
} }
bool PeerReceiveHandshakeCommand::executeInternal() bool PeerReceiveHandshakeCommand::executeInternal()

View File

@ -47,6 +47,7 @@
#include "MSEHandshake.h" #include "MSEHandshake.h"
#include "ARC4Encryptor.h" #include "ARC4Encryptor.h"
#include "ARC4Decryptor.h" #include "ARC4Decryptor.h"
#include "RequestGroupMan.h"
namespace aria2 { namespace aria2 {
@ -70,7 +71,7 @@ ReceiverMSEHandshakeCommand::~ReceiverMSEHandshakeCommand()
bool ReceiverMSEHandshakeCommand::exitBeforeExecute() bool ReceiverMSEHandshakeCommand::exitBeforeExecute()
{ {
return e->isHaltRequested(); return e->isHaltRequested() || e->_requestGroupMan->downloadFinished();
} }
bool ReceiverMSEHandshakeCommand::executeInternal() bool ReceiverMSEHandshakeCommand::executeInternal()