diff --git a/plugins/twitch/event-sub.cpp b/plugins/twitch/event-sub.cpp index a5d41c13..f55d038e 100644 --- a/plugins/twitch/event-sub.cpp +++ b/plugins/twitch/event-sub.cpp @@ -72,7 +72,6 @@ void EventSub::UnregisterInstance() void EventSub::ConnectThread() { _client->reset(); - _connected = true; websocketpp::lib::error_code ec; EventSubWSClient::connection_ptr con = _client->get_connection(_url, ec); @@ -113,6 +112,7 @@ void EventSub::Connect() _thread.join(); } _disconnect = false; + _connected = true; _thread = std::thread(&EventSub::ConnectThread, this); }