summaryrefslogtreecommitdiff
path: root/protocols/Discord/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-07 16:51:20 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-07 16:51:20 +0300
commita64964a329edfeb8c6fafb1265163015d4a579ce (patch)
tree4c6b41b7953aa42ae7934908e5cd2631643a4431 /protocols/Discord/src
parentec29c1c000f233c012f0b7df8914fe59630e64d2 (diff)
and also don't try to log in forever
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r--protocols/Discord/src/gateway.cpp11
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;
}