summaryrefslogtreecommitdiff
path: root/protocols/Discord
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord')
-rw-r--r--protocols/Discord/src/http.cpp1
-rw-r--r--protocols/Discord/src/proto.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Discord/src/http.cpp b/protocols/Discord/src/http.cpp
index 147bebe209..87cdf9369a 100644
--- a/protocols/Discord/src/http.cpp
+++ b/protocols/Discord/src/http.cpp
@@ -96,6 +96,7 @@ void CDiscordProto::ServerThread(void*)
m_szAccessToken = getStringA(DB_KEY_TOKEN);
m_hAPIConnection = nullptr;
m_bTerminated = false;
+ m_hWorkerThread = GetCurrentThread();
debugLogA("CDiscordProto::WorkerThread: %s", "entering");
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index 00c7daf351..19db84f38a 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -255,7 +255,7 @@ int CDiscordProto::SetStatus(int iNewStatus)
else if (m_hWorkerThread == nullptr && !IsStatusConnecting(m_iStatus)) {
m_iStatus = ID_STATUS_CONNECTING;
ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus);
- m_hWorkerThread = ForkThreadEx(&CDiscordProto::ServerThread, nullptr, nullptr);
+ ForkThread(&CDiscordProto::ServerThread);
}
else if (m_bOnline) {
debugLogA("setting server online status to %d", iNewStatus);