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

Revert previous change because get_peers message is needed for
	announce_peer anyway.	
	* src/DHTGetPeersCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-02-08 18:21:19 +00:00
parent f1d786469c
commit 9ab0ece87f
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Revert previous change because get_peers message is needed for
announce_peer anyway.
* src/DHTGetPeersCommand.cc
2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Request peers thought DHT only when download hasn't finished.

View File

@ -44,7 +44,6 @@
#include "BtContext.h"
#include "BtRuntime.h"
#include "PeerStorage.h"
#include "PieceStorage.h"
#include "Peer.h"
#include "Logger.h"
@ -72,7 +71,7 @@ bool DHTGetPeersCommand::execute()
if(btRuntime->isHalt()) {
return true;
}
if(!pieceStorage->downloadFinished() && _task.isNull() &&
if(_task.isNull() &&
(_numRetry > 0 && _lastGetPeerTime.elapsed(RETRY_INTERVAL) ||
_lastGetPeerTime.elapsed(GET_PEER_INTERVAL))) {
logger->debug("Issuing PeerLookup for infoHash=%s",