From 0b18a8331ae6ccee6c07aff032e5568e0025b2fa Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 14 Apr 2018 18:27:13 +0200 Subject: [PATCH] Fix channels not going offline properly --- src/providers/twitch/twitchchannel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/providers/twitch/twitchchannel.cpp b/src/providers/twitch/twitchchannel.cpp index cdb16af8a..52f36c2d9 100644 --- a/src/providers/twitch/twitchchannel.cpp +++ b/src/providers/twitch/twitchchannel.cpp @@ -181,14 +181,16 @@ void TwitchChannel::addRecentChatter(const std::shared_ptr &m void TwitchChannel::setLive(bool newLiveStatus) { + bool gotNewLiveStatus = false; { std::lock_guard lock(this->streamStatusMutex); if (this->streamStatus.live != newLiveStatus) { + gotNewLiveStatus = true; this->streamStatus.live = newLiveStatus; } } - if (newLiveStatus) { + if (gotNewLiveStatus) { this->updateLiveInfo.invoke(); } }