提交 ca656175 编写于 作者: J jp9000

UI: Fix Mixer allowing endless login retries

上级 1c4a6ca6
......@@ -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<Auth> MixerAuth::Login(QWidget *parent)
}
std::string error;
if (auth->GetChannelInfo()) {
if (auth->GetChannelInfo(false)) {
return auth;
}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册