ircd:Ⓜ️:fed::well_known: Deduplicate requests sharing the same buffer only.
This commit is contained in:
parent
56984d59e9
commit
ab77a32dce
|
@ -233,13 +233,20 @@ try
|
|||
};
|
||||
}
|
||||
|
||||
// Ride any duplicate request already pending
|
||||
// Check for duplicate requests
|
||||
for(const auto &req : request::list)
|
||||
if(req->target == target)
|
||||
{
|
||||
//XXX: Support multiple result buffers.
|
||||
if(data(req->out) != data(buf))
|
||||
break;
|
||||
|
||||
// Ride any duplicate request already pending
|
||||
return ctx::future<string_view>
|
||||
{
|
||||
req->promise
|
||||
};
|
||||
}
|
||||
|
||||
// Synchronize modification of the request::list
|
||||
const std::lock_guard request_lock
|
||||
|
|
Loading…
Reference in New Issue