From a64964a329edfeb8c6fafb1265163015d4a579ce Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Mar 2021 16:51:20 +0300 Subject: and also don't try to log in forever --- protocols/Discord/src/gateway.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'protocols') 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; } -- cgit v1.2.3