From 3d1a6b75a7016b7cf546895da51c6de5a6688ea1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 28 Feb 2021 11:44:32 +0300 Subject: moreover, we don't have to report connection failure for the first error 404 --- protocols/Discord/src/gateway.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'protocols/Discord') diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp index 56d2b9ccf5..adee0a2018 100644 --- a/protocols/Discord/src/gateway.cpp +++ b/protocols/Discord/src/gateway.cpp @@ -67,8 +67,9 @@ 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) - return false; + return pReply->resultCode == 404 && hdrs[1].szName == nullptr; // succeeded! debugLogA("Gateway connection succeeded"); -- cgit v1.2.3