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

proxy server: check clientId for merging put

parent 1a671404
No related branches found
No related tags found
No related merge requests found
......@@ -946,7 +946,10 @@ DhtProxyServer::put(restinio::request_handle_t request,
auto& sPuts = puts_[infoHash];
if (value->id == Value::INVALID_ID) {
for (auto& pp : sPuts.puts) {
if (pp.second.pushToken == pushToken and pp.second.value->contentEquals(*value)) {
if (pp.second.pushToken == pushToken
and pp.second.clientId == clientId
and pp.second.value->contentEquals(*value))
{
pp.second.expireTimer->expires_at(timeout);
pp.second.expireTimer->async_wait(std::bind(&DhtProxyServer::handleCancelPermamentPut, this,
std::placeholders::_1, infoHash, pp.second.value->id));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment