mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
dht: make sure search can be flagged "done"
This commit is contained in:
1 parent
babfed73f3
commit
ec587f9b58
1 file changed
+3
-3
+3
-3
@@ -1182,9 +1182,6 @@ void Dht::searchSendAnnounceValue(const std::shared_ptr<Search>& sr) {
|
||||
++ait;
|
||||
}
|
||||
}
|
||||
|
||||
if (sr->callbacks.empty() && sr->announce.empty() && sr->listeners.empty())
|
||||
sr->done = true;
|
||||
}
|
||||
};
|
||||
DHT_LOG.WARN("[search %s IPv%c] [node %s] sending %s",
|
||||
@@ -1290,6 +1287,9 @@ Dht::searchStep(std::shared_ptr<Search> sr)
|
||||
|
||||
// Announce requests
|
||||
searchSendAnnounceValue(sr);
|
||||
|
||||
if (sr->callbacks.empty() && sr->announce.empty() && sr->listeners.empty())
|
||||
sr->done = true;
|
||||
}
|
||||
|
||||
if (sr->currentlySolicitedNodeCount() < MAX_REQUESTED_SEARCH_NODES) {
|
||||
|
||||
Reference in new issue
Block a user