summaryrefslogtreecommitdiff
path: root/src/PeerReceiveHandshakeCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-02-23 15:37:47 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-02-23 15:37:47 +0000
commita1f0d44c9f75651c39a98ec1887cf442e74ea904 (patch)
tree9717c3547f6b81dc8ecc3eab0fbf87cf75b67a94 /src/PeerReceiveHandshakeCommand.cc
parent88cd57f7a2c4200cd500896e33b579caab0be3b7 (diff)
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
Diffstat (limited to 'src/PeerReceiveHandshakeCommand.cc')
-rw-r--r--src/PeerReceiveHandshakeCommand.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/PeerReceiveHandshakeCommand.cc b/src/PeerReceiveHandshakeCommand.cc
index 598f1c92..55efe66d 100644
--- a/src/PeerReceiveHandshakeCommand.cc
+++ b/src/PeerReceiveHandshakeCommand.cc
@@ -51,6 +51,7 @@
#include "Logger.h"
#include "prefs.h"
#include "Option.h"
+#include "RequestGroupMan.h"
namespace aria2 {
@@ -76,7 +77,7 @@ PeerReceiveHandshakeCommand::~PeerReceiveHandshakeCommand() {}
bool PeerReceiveHandshakeCommand::exitBeforeExecute()
{
- return e->isHaltRequested();
+ return e->isHaltRequested() || e->_requestGroupMan->downloadFinished();
}
bool PeerReceiveHandshakeCommand::executeInternal()