mirror of https://github.com/aria2/aria2
2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Request peers thought DHT only when download hasn't finished. * src/DHTGetPeersCommand.ccpull/1/head
parent
6fe7b7c8f3
commit
f1d786469c
|
@ -1,3 +1,8 @@
|
||||||
|
2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Request peers thought DHT only when download hasn't finished.
|
||||||
|
* src/DHTGetPeersCommand.cc
|
||||||
|
|
||||||
2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-02-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Force refresh bucket when startup if certain time has passed(currently 15 minutes).
|
Force refresh bucket when startup if certain time has passed(currently 15 minutes).
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "BtContext.h"
|
#include "BtContext.h"
|
||||||
#include "BtRuntime.h"
|
#include "BtRuntime.h"
|
||||||
#include "PeerStorage.h"
|
#include "PeerStorage.h"
|
||||||
|
#include "PieceStorage.h"
|
||||||
#include "Peer.h"
|
#include "Peer.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ bool DHTGetPeersCommand::execute()
|
||||||
if(btRuntime->isHalt()) {
|
if(btRuntime->isHalt()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(_task.isNull() &&
|
if(!pieceStorage->downloadFinished() && _task.isNull() &&
|
||||||
(_numRetry > 0 && _lastGetPeerTime.elapsed(RETRY_INTERVAL) ||
|
(_numRetry > 0 && _lastGetPeerTime.elapsed(RETRY_INTERVAL) ||
|
||||||
_lastGetPeerTime.elapsed(GET_PEER_INTERVAL))) {
|
_lastGetPeerTime.elapsed(GET_PEER_INTERVAL))) {
|
||||||
logger->debug("Issuing PeerLookup for infoHash=%s",
|
logger->debug("Issuing PeerLookup for infoHash=%s",
|
||||||
|
|
Loading…
Reference in New Issue