diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 7dc83b3c2..aea4844ea 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -811,12 +811,8 @@ void HTTPWebSocket::StartHTTPSocket(int threadCount, int threadPostCount, bool s void HTTPWebSocket::StopHTTPSocket() { // Interrupting socket here because stop without interrupting is illegal. - InterruptHTTPSocket(); - - // Resetting queue as it has done previously that restricts running this socket again. - // However this doesn't affect current rpc handlers because they handle their own shared_ptr of queue, but adding new rpc handlers - // is UB after this call. - m_workQueue.reset(); + HTTPSocket::InterruptHTTPSocket(); + HTTPSocket::StopHTTPSocket(); m_workPostQueue.reset(); }