diff --git a/ChangeLog b/ChangeLog index 9d2fd7b7..42858567 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2010-08-29 Tatsuhiro Tsujikawa - Release 1.10.1 + Drop connection when BtRuntime::isHalt() is true. + * src/PeerReceiveHandshakeCommand.cc 2010-08-29 Tatsuhiro Tsujikawa diff --git a/src/PeerReceiveHandshakeCommand.cc b/src/PeerReceiveHandshakeCommand.cc index 35f88433..a6886009 100644 --- a/src/PeerReceiveHandshakeCommand.cc +++ b/src/PeerReceiveHandshakeCommand.cc @@ -114,7 +114,11 @@ bool PeerReceiveHandshakeCommand::executeInternal() (StringFormat("Unknown info hash %s", util::toHex(infoHash).c_str()).str()); } - + if(btRuntime->isHalt()) { + getLogger()->debug("Info hash found but the download is over." + " Dropping connection."); + return true; + } TransferStat tstat = downloadContext->getOwnerRequestGroup()->calculateStat(); const unsigned int maxDownloadLimit =