From 789ff702ac5eca7901c3a96a3d58e0af002b9f77 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 6 May 2020 14:54:41 -0400 Subject: [PATCH] fixed sudden webconsole hangs --- daemon/HTTPServer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp index a1cba3ce..de052a2b 100644 --- a/daemon/HTTPServer.cpp +++ b/daemon/HTTPServer.cpp @@ -1227,10 +1227,10 @@ namespace http { LogPrint(eLogInfo, "HTTPServer: password set to ", pass); } - m_Thread = std::unique_ptr(new std::thread (std::bind (&HTTPServer::Run, this))); + m_IsRunning = true; + m_Thread.reset (new std::thread (std::bind (&HTTPServer::Run, this))); m_Acceptor.listen (); Accept (); - m_IsRunning = true; } void HTTPServer::Stop ()