diff --git a/src/dpp/queues.cpp b/src/dpp/queues.cpp index 3b3e021dd5..4f8e297fcd 100644 --- a/src/dpp/queues.cpp +++ b/src/dpp/queues.cpp @@ -342,8 +342,10 @@ void request_queue::out_loop() /* Post a http_request into the queue */ void request_queue::post_request(http_request* req) { - std::unique_lock lock(in_mutex); - requests_in[req->endpoint].push_back(req); + { + std::unique_lock lock(in_mutex); + requests_in[req->endpoint].push_back(req); + } in_ready.notify_one(); }