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
Branches
Tags
No related merge requests found
...@@ -946,7 +946,10 @@ DhtProxyServer::put(restinio::request_handle_t request, ...@@ -946,7 +946,10 @@ DhtProxyServer::put(restinio::request_handle_t request,
auto& sPuts = puts_[infoHash]; auto& sPuts = puts_[infoHash];
if (value->id == Value::INVALID_ID) { if (value->id == Value::INVALID_ID) {
for (auto& pp : sPuts.puts) { 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->expires_at(timeout);
pp.second.expireTimer->async_wait(std::bind(&DhtProxyServer::handleCancelPermamentPut, this, pp.second.expireTimer->async_wait(std::bind(&DhtProxyServer::handleCancelPermamentPut, this,
std::placeholders::_1, infoHash, pp.second.value->id)); 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