diff --git a/UI/auth-mixer.cpp b/UI/auth-mixer.cpp index 09dedfc08..d835cfc16 100644 --- a/UI/auth-mixer.cpp +++ b/UI/auth-mixer.cpp @@ -44,7 +44,7 @@ MixerAuth::MixerAuth(const Def &d) { } -bool MixerAuth::GetChannelInfo() +bool MixerAuth::GetChannelInfo(bool allow_retry) try { std::string client_id = MIXER_CLIENTID; deobfuscate_str(&client_id[0], MIXER_HASH); @@ -148,8 +148,8 @@ try { * it'll be an empty stream key usually. So treat empty stream key as * an error. */ if (key_suffix.empty()) { - if (RetryLogin()) { - return GetChannelInfo(); + if (allow_retry && RetryLogin()) { + return GetChannelInfo(false); } throw ErrorInfo("Auth Failure", "Could not get channel data"); } @@ -305,7 +305,7 @@ std::shared_ptr MixerAuth::Login(QWidget *parent) } std::string error; - if (auth->GetChannelInfo()) { + if (auth->GetChannelInfo(false)) { return auth; } diff --git a/UI/auth-mixer.hpp b/UI/auth-mixer.hpp index e87b507cb..29a6e3394 100644 --- a/UI/auth-mixer.hpp +++ b/UI/auth-mixer.hpp @@ -19,7 +19,7 @@ class MixerAuth : public OAuthStreamKey { virtual void SaveInternal() override; virtual bool LoadInternal() override; - bool GetChannelInfo(); + bool GetChannelInfo(bool allow_retry = true); virtual void LoadUI() override;