Fix segfault in http

This commit is contained in:
Lion Kortlepel
2021-12-06 10:22:52 +01:00
parent 62cc1e9ce4
commit 279c93179c
3 changed files with 15 additions and 10 deletions

View File

@@ -8,11 +8,11 @@ public:
IThreaded()
// invokes operator() on this object
: mThread() { }
~IThreaded() noexcept {
if (mThread.joinable()) {
mThread.join();
}
~IThreaded() noexcept {
if (mThread.joinable()) {
mThread.join();
}
}
virtual void Start() final {
mThread = std::thread([this] { (*this)(); });