diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 7150f96ed..8d0d3c158 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -451,8 +451,10 @@ bool StartHTTPServer() threadResult = task.get_future(); threadHTTP = boost::thread(std::bind(std::move(task), eventBase, eventHTTP)); - for (int i = 0; i < rpcThreads; i++) - boost::thread(boost::bind(&HTTPWorkQueueRun, workQueue)); + for (int i = 0; i < rpcThreads; i++) { + boost::thread rpc_worker(HTTPWorkQueueRun, workQueue); + rpc_worker.detach(); + } return true; }