summaryrefslogtreecommitdiff
path: root/protocols/Discord/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r--protocols/Discord/src/gateway.cpp2
-rw-r--r--protocols/Discord/src/server.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp
index 4c801c32ce..4506a1a361 100644
--- a/protocols/Discord/src/gateway.cpp
+++ b/protocols/Discord/src/gateway.cpp
@@ -204,6 +204,7 @@ bool CDiscordProto::GatewayThreadWorker()
int bufSize = Netlib_Recv(m_hGatewayConnection, (char*)buf + offset, _countof(buf) - offset, MSG_NODUMP);
if (bufSize == 0) {
debugLogA("Gateway connection gracefully closed");
+ bExit = !m_bTerminated;
break;
}
if (bufSize < 0) {
@@ -228,6 +229,7 @@ bool CDiscordProto::GatewayThreadWorker()
int result = Netlib_Recv(m_hGatewayConnection, (char*)buf, _countof(buf), MSG_NODUMP);
if (result == 0) {
debugLogA("Gateway connection gracefully closed");
+ bExit = !m_bTerminated;
break;
}
if (result < 0) {
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp
index 02edcdaed0..19e96cdb28 100644
--- a/protocols/Discord/src/server.cpp
+++ b/protocols/Discord/src/server.cpp
@@ -67,7 +67,7 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest
if (!pUser->bIsPrivate) {
si = g_chatApi.SM_FindSession(pUser->wszUsername, m_szModuleName);
if (si == nullptr) {
- debugLogA("nessage to unknown channal %lld ignored", pUser->channelId);
+ debugLogA("nessage to unknown channel %lld ignored", pUser->channelId);
return;
}
}