summaryrefslogtreecommitdiff
path: root/protocols/Discord
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-07 14:13:49 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-07 14:13:49 +0300
commitec29c1c000f233c012f0b7df8914fe59630e64d2 (patch)
treed7bcb9923f6c986a5c64d94ac9f1abc935b9f4b4 /protocols/Discord
parentb26db5be329bb29e3b3cffadffb700ab8fd848ac (diff)
more fixes for #2499
Diffstat (limited to 'protocols/Discord')
-rw-r--r--protocols/Discord/src/gateway.cpp10
-rw-r--r--protocols/Discord/src/version.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp
index adee0a2018..4f0d32f321 100644
--- a/protocols/Discord/src/gateway.cpp
+++ b/protocols/Discord/src/gateway.cpp
@@ -68,8 +68,14 @@ bool CDiscordProto::GatewayThreadWorker()
}
// if there's no cookie & Miranda is bounced with error 404, simply apply the cookie and try again
- if (pReply->resultCode != 101)
- return pReply->resultCode == 404 && hdrs[1].szName == nullptr;
+ 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;
+ }
+ return false;
+ }
// succeeded!
debugLogA("Gateway connection succeeded");
diff --git a/protocols/Discord/src/version.h b/protocols/Discord/src/version.h
index edf81ff62c..13d0a5f8ba 100644
--- a/protocols/Discord/src/version.h
+++ b/protocols/Discord/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 6
#define __RELEASE_NUM 2
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
#include <stdver.h>