diff --git a/src/asyncrpcqueue.cpp b/src/asyncrpcqueue.cpp index 4994337c7..a6f35d367 100644 --- a/src/asyncrpcqueue.cpp +++ b/src/asyncrpcqueue.cpp @@ -183,6 +183,7 @@ void AsyncRPCQueue::addWorker() { * Return the number of worker threads spawned by the queue */ size_t AsyncRPCQueue::getNumberOfWorkers() const { + std::lock_guard guard(lock_); return workers_.size(); }