diff --git a/httplib.h b/httplib.h index 12c7b85..761481b 100644 --- a/httplib.h +++ b/httplib.h @@ -560,10 +560,9 @@ public: { std::unique_lock lock(mutex_); shutdown_ = true; + cond_.notify_all(); } - cond_.notify_all(); - // Join... for (auto &t : threads_) { t.join();