diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c3817acb..417589177 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Minor: Messages held by automod are now shown to the user. (#2626) - Bugfix: Automod messages now work properly again. (#2682) - Bugfix: `Login expired` message no longer highlights all tabs. (#2735) +- Bugfix: Fix a deadlock that would occur during user badge loading. (#1704, #2756) ## 2.3.1 diff --git a/src/providers/twitch/TwitchBadges.cpp b/src/providers/twitch/TwitchBadges.cpp index f3455c71a..694c20270 100644 --- a/src/providers/twitch/TwitchBadges.cpp +++ b/src/providers/twitch/TwitchBadges.cpp @@ -88,6 +88,10 @@ void TwitchBadges::loaded() // Flush callback queue std::unique_lock queueLock(this->queueMutex_); + + // Once we have gained unique access of the queue, we can release our unique access of the loaded mutex allowing future calls to read locked_ + loadedLock.unlock(); + while (!this->callbackQueue_.empty()) { auto callback = this->callbackQueue_.front();