mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Fix Twitch event sub connection breaking after reconnect message
This will have to be revisited to avoid events being lost during the reconnect
This commit is contained in:
parent
18524761a6
commit
ca3bbf5660
|
|
@ -379,6 +379,7 @@ void EventSub::HandleNotification(obs_data_t *data)
|
|||
|
||||
void EventSub::HandleReconnect(obs_data_t *data)
|
||||
{
|
||||
blog(LOG_INFO, "Twitch EventSub session_reconnect received");
|
||||
OBSDataAutoRelease session = obs_data_get_obj(data, "session");
|
||||
auto id = obs_data_get_string(session, "id");
|
||||
if (!IsValidID(id)) {
|
||||
|
|
@ -386,10 +387,9 @@ void EventSub::HandleReconnect(obs_data_t *data)
|
|||
"ignoring Twitch EventSub reconnect message with invalid id");
|
||||
return;
|
||||
}
|
||||
_url = obs_data_get_string(session, "reconnect_url");
|
||||
websocketpp::lib::error_code ec;
|
||||
_client.close(_connection, websocketpp::close::status::normal,
|
||||
"Twitch EventSub reconnecting", ec);
|
||||
|
||||
// TODO:
|
||||
// Implement proper reconnect handing to avoid dropped events
|
||||
}
|
||||
|
||||
void EventSub::HandleRevocation(obs_data_t *data)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user