Skip to content
Snippets Groups Projects
Commit 2a3c3013 authored by kaldoran's avatar kaldoran Committed by Adrien Béraud
Browse files

dht: Fix get and put at the same time on a same node

When the put is performed just after a get, then the get will not include the value which was in the put.
parent 6f4923da
Branches
Tags
No related merge requests found
......@@ -1470,6 +1470,8 @@ Dht::announce(const InfoHash& id, sa_family_t af, std::shared_ptr<Value> value,
return;
}
storageStore(id, value, created);
auto& srs = af == AF_INET ? searches4 : searches6;
auto srp = srs.find(id);
auto sr = srp == srs.end() ? search(id, af) : srp->second;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment