From 2331374d1ffe2432496e484443a58e859a7f560f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 16 Feb 2025 16:56:14 +0300 Subject: Discord: the safer way of handling web sockets --- protocols/Discord/src/connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/Discord/src/connection.cpp') diff --git a/protocols/Discord/src/connection.cpp b/protocols/Discord/src/connection.cpp index ff7e765ecb..4ac9cead47 100644 --- a/protocols/Discord/src/connection.cpp +++ b/protocols/Discord/src/connection.cpp @@ -93,8 +93,8 @@ void CDiscordProto::ShutdownSession() pMfaDialog->Close(); if (m_hWorkerThread) SetEvent(m_evRequestsQueue); - if (m_ws) - m_ws->terminate(); + if (m_bConnected) + m_ws.terminate(); if (m_hAPIConnection) Netlib_Shutdown(m_hAPIConnection); -- cgit v1.2.3