aboutsummaryrefslogtreecommitdiff
path: root/src/httpserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/httpserver.cpp')
-rw-r--r--src/httpserver.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 1692b43f28..799de1c2cb 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -118,7 +118,7 @@ public:
void Run()
{
ThreadCounter count(*this);
- while (running) {
+ while (true) {
std::unique_ptr<WorkItem> i;
{
std::unique_lock<std::mutex> lock(cs);
@@ -146,13 +146,6 @@ public:
while (numThreads > 0)
cond.wait(lock);
}
-
- /** Return current depth of queue */
- size_t Depth()
- {
- std::unique_lock<std::mutex> lock(cs);
- return queue.size();
- }
};
struct HTTPPathHandler
@@ -482,6 +475,7 @@ void StopHTTPServer()
LogPrint("http", "Waiting for HTTP worker threads to exit\n");
workQueue->WaitExit();
delete workQueue;
+ workQueue = nullptr;
}
if (eventBase) {
LogPrint("http", "Waiting for HTTP event thread to exit\n");