diff --git a/src/WebSocketServer.cpp b/src/WebSocketServer.cpp index bf26dfdb..1d575afa 100644 --- a/src/WebSocketServer.cpp +++ b/src/WebSocketServer.cpp @@ -188,6 +188,9 @@ std::vector WebSocketServer::GetWebSocke // It isn't consistent to directly call the WebSocketServer from the events system, but it would also be dumb to make it unnecessarily complicated. void WebSocketServer::BroadcastEvent(uint64_t requiredIntent, std::string eventType, json eventData) { + if (!_server.is_listening()) + return; + QtConcurrent::run(&_threadPool, [=]() { // Populate message object json eventMessage;