mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
dht: wait for connection before running searches
This commit is contained in:
1 parent
d44c59016e
commit
bd08506146
1 file changed
+2
@@ -722,6 +722,8 @@ void
|
||||
Dht::searchStep(std::shared_ptr<Search> sr)
|
||||
{
|
||||
if (not sr or sr->expired or sr->done) return;
|
||||
if (sr->nodes.empty() and (sr->af == AF_INET ? buckets : buckets6).isEmpty())
|
||||
return; // wait for connection
|
||||
|
||||
const auto& now = scheduler.time();
|
||||
DHT_LOG.DEBUG("[search %s IPv%c] step (%d requests)", sr->id.toString().c_str(), sr->af == AF_INET ? '4' : '6', sr->currentGetRequests());
|
||||
|
||||
Reference in new issue
Block a user