Fix a deadlock that would occur when loading Twitch badges (#2756)

This commit is contained in:
pajlada
2021-05-08 15:29:12 +02:00
committed by GitHub
parent bb73069817
commit 6f6ccb8c2f
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -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();