fix(eventsub): connection race (#6017)

This commit is contained in:
pajlada
2025-03-02 16:48:08 +01:00
committed by GitHub
parent 1812f1bb15
commit 58859d439c
7 changed files with 404 additions and 156 deletions
+3 -1
View File
@@ -165,6 +165,7 @@ Application::Application(Settings &_settings, const Paths &paths,
, logging(new Logging(_settings))
, emotes(new Emotes)
, accounts(new AccountController)
, eventSub(makeEventSubController(_settings))
, hotkeys(new HotkeyController)
, windows(new WindowManager(paths, _settings, *this->themes, *this->fonts))
, toasts(new Toasts)
@@ -193,7 +194,6 @@ Application::Application(Settings &_settings, const Paths &paths,
, streamerMode(new StreamerMode)
, twitchUsers(new TwitchUsers)
, pronouns(new pronouns::Pronouns)
, eventSub(makeEventSubController(_settings))
#ifdef CHATTERINO_HAVE_PLUGINS
, plugins(new PluginController(paths))
#endif
@@ -203,6 +203,8 @@ Application::Application(Settings &_settings, const Paths &paths,
Application::~Application()
{
this->eventSub->setQuitting();
// we do this early to ensure getApp isn't used in any dtors
INSTANCE = nullptr;
}