summaryrefslogtreecommitdiff
path: root/protocols/Discord/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r--protocols/Discord/src/gateway.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp
index c713ce79d0..cd01f729c0 100644
--- a/protocols/Discord/src/gateway.cpp
+++ b/protocols/Discord/src/gateway.cpp
@@ -41,9 +41,17 @@ void CDiscordProto::GatewayThread(void*)
bool CDiscordProto::GatewayThreadWorker()
{
- m_hGatewayConnection = WebSocket_Connect(m_hGatewayNetlibUser, m_szGateway + "/?encoding=json&v=6");
- if (m_hGatewayConnection == nullptr)
+ NETLIBHTTPHEADER hdrs[] =
+ {
+ { "Sec-WebSocket-Key", "KFShSwLlp4E6C7JZc5h4sg==" },
+ { 0, 0 }
+ };
+
+ m_hGatewayConnection = WebSocket_Connect(m_hGatewayNetlibUser, m_szGateway + "/?encoding=json&v=6", hdrs);
+ if (m_hGatewayConnection == nullptr) {
debugLogA("Gateway connection failed, exiting");
+ return false;
+ }
debugLogA("Gateway connection succeeded");