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

dht: don't send nodes in storageChanged

parent d0cebaa0
No related branches found
No related tags found
No related merge requests found
...@@ -1586,7 +1586,6 @@ Dht::findStorage(const InfoHash& id) const ...@@ -1586,7 +1586,6 @@ Dht::findStorage(const InfoHash& id) const
void void
Dht::storageChanged(Storage& st, ValueStorage& v) Dht::storageChanged(Storage& st, ValueStorage& v)
{ {
const auto& now = scheduler.time();
if (not st.local_listeners.empty()) { if (not st.local_listeners.empty()) {
std::vector<std::pair<GetCallback, std::vector<std::shared_ptr<Value>>>> cbs; std::vector<std::pair<GetCallback, std::vector<std::shared_ptr<Value>>>> cbs;
DHT_LOG.DEBUG("Storage changed. Sending update to %lu local listeners.", st.local_listeners.size()); DHT_LOG.DEBUG("Storage changed. Sending update to %lu local listeners.", st.local_listeners.size());
...@@ -1607,9 +1606,7 @@ Dht::storageChanged(Storage& st, ValueStorage& v) ...@@ -1607,9 +1606,7 @@ Dht::storageChanged(Storage& st, ValueStorage& v)
std::vector<std::shared_ptr<Value>> vals; std::vector<std::shared_ptr<Value>> vals;
vals.push_back(v.data); vals.push_back(v.data);
Blob ntoken = makeToken((const sockaddr*)&l.first->ss, false); Blob ntoken = makeToken((const sockaddr*)&l.first->ss, false);
network_engine.tellListener(l.first, l.second.rid, st.id, WANT4 | WANT6, ntoken, network_engine.tellListener(l.first, l.second.rid, st.id, 0, ntoken, {}, {}, vals);
buckets.findClosestNodes(st.id, now, TARGET_NODES), buckets6.findClosestNodes(st.id, now, TARGET_NODES),
vals);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment