diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-27 16:35:03 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-27 16:35:03 +0300 |
commit | ba96f36fbf4d6c1b9361b04cbbbc8daf1583c754 (patch) | |
tree | 90cb715de0678f1eb414736f1393926e4c0fa208 /protocols | |
parent | a2dd949bfeb60f9e04dee9b30821343444be8ba4 (diff) |
code cleaning
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/http.cpp | 1 | ||||
-rw-r--r-- | protocols/Discord/src/proto.cpp | 2 |
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);
|