mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
WebSocketServer: Don't try to send events if the server is not listening
This commit is contained in:
parent
23b6ce607c
commit
902c9dfdc5
@ -188,6 +188,9 @@ std::vector<WebSocketServer::WebSocketSessionState> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user