diff --git a/matrix/fed_well_known.cc b/matrix/fed_well_known.cc index 1c71fd519..71ecf8251 100644 --- a/matrix/fed_well_known.cc +++ b/matrix/fed_well_known.cc @@ -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 { req->promise }; + } // Synchronize modification of the request::list const std::lock_guard request_lock