Skip to content
Snippets Groups Projects
Commit bd085061 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

dht: wait for connection before running searches

parent d44c5901
No related branches found
No related tags found
No related merge requests found
......@@ -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());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment