summaryrefslogtreecommitdiff
path: root/protocols/Discord
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-02-28 11:44:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-02-28 11:44:32 +0300
commit3d1a6b75a7016b7cf546895da51c6de5a6688ea1 (patch)
treed743920d1c73a678e101e64aab15f4a551f974e0 /protocols/Discord
parente70028aeff4dad25c97226f6faeeb995ab99e9b1 (diff)
moreover, we don't have to report connection failure for the first error 404
Diffstat (limited to 'protocols/Discord')
-rw-r--r--protocols/Discord/src/gateway.cpp3
1 files changed, 2 insertions, 1 deletions
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");