Fix websocket events not being processed

This could happen if a websocket event message arrived just after the
macro condition checks of the current interval completed and just before
the websocket event message buffers were cleared.
This commit is contained in:
WarmUpTill 2023-04-16 16:09:51 +02:00 committed by WarmUpTill
parent c821bb20d0
commit e51318768d

View File

@ -270,6 +270,7 @@ void WSConnection::HandleEvent(obs_data_t *msg)
return;
}
auto eventDataNested = obs_data_get_obj(eventData, "eventData");
std::lock_guard<std::mutex> lock(switcher->m);
_messages.emplace_back(obs_data_get_string(eventDataNested, "message"));
vblog(LOG_INFO, "received event msg \"%s\"",
obs_data_get_string(eventDataNested, "message"));