Fix a deadlock that would occur when loading Twitch badges (#2756)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user