diff options
Diffstat (limited to 'protocols/Discord/src/proto.cpp')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index f1df2c2a12..5a33a9d6f5 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -44,6 +44,7 @@ static int compareCalls(const CDiscordVoiceCall *p1, const CDiscordVoiceCall *p2 CDiscordProto::CDiscordProto(const char *proto_name, const wchar_t *username) :
PROTO<CDiscordProto>(proto_name, username),
+ m_ws(this),
m_impl(*this),
m_arHttpQueue(10, compareRequests),
m_evRequestsQueue(CreateEvent(nullptr, FALSE, FALSE, nullptr)),
@@ -174,8 +175,8 @@ void CDiscordProto::OnShutdown() for (auto &it : arGuilds)
it->SaveToFile();
- if (m_ws)
- m_ws->terminate();
+ if (m_bConnected)
+ m_ws.terminate();
if (g_plugin.bVoiceService)
CallService(MS_VOICESERVICE_UNREGISTER, (WPARAM)m_szModuleName, 0);
|