diff options
author | George Hazan <ghazan@miranda.im> | 2021-03-07 16:51:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-03-07 16:51:20 +0300 |
commit | a64964a329edfeb8c6fafb1265163015d4a579ce (patch) | |
tree | 4c6b41b7953aa42ae7934908e5cd2631643a4431 /protocols/Discord/src | |
parent | ec29c1c000f233c012f0b7df8914fe59630e64d2 (diff) |
and also don't try to log in forever
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r-- | protocols/Discord/src/gateway.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp index 4f0d32f321..cfb6d82c17 100644 --- a/protocols/Discord/src/gateway.cpp +++ b/protocols/Discord/src/gateway.cpp @@ -67,12 +67,13 @@ bool CDiscordProto::GatewayThreadWorker() m_szWSCookie = pszNewCookie; } - // if there's no cookie & Miranda is bounced with error 404, simply apply the cookie and try again if (pReply->resultCode != 101) { - if (pReply->resultCode == 404) { // shitty Cloudflare... - if (hdrs[1].szName != nullptr) - m_szWSCookie.Empty(); // don't use the same cookie twice - return true; + // if there's no cookie & Miranda is bounced with error 404, simply apply the cookie and try again + if (pReply->resultCode == 404) { + if (hdrs[1].szName == nullptr) + return true; + + m_szWSCookie.Empty(); // don't use the same cookie twice } return false; } |