From b1991e51d5c53383e4cf2bb8fc1830eef7ed20b8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 14 Dec 2022 19:20:21 +0300 Subject: =?UTF-8?q?fixes=20#3264=20(Telegram:=20=D1=83=D1=87=D1=91=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BD=D0=B5=20=D1=83=D0=B4=D0=B0=D0=BB=D1=8F?= =?UTF-8?q?=D0=B5=D1=82=D1=81=D1=8F=20=D0=B8=D0=B7=20=D0=BD=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=B5=D0=BA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/src/mt_proto.cpp | 5 +++++ protocols/Telegram/src/mt_proto.h | 1 + protocols/Telegram/src/server.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'protocols/Telegram/src') diff --git a/protocols/Telegram/src/mt_proto.cpp b/protocols/Telegram/src/mt_proto.cpp index 90e6e9c68f..3550329e45 100644 --- a/protocols/Telegram/src/mt_proto.cpp +++ b/protocols/Telegram/src/mt_proto.cpp @@ -60,6 +60,11 @@ void CMTProto::OnModulesLoaded() } } +void CMTProto::OnShutdown() +{ + m_bTerminated = true; +} + void CMTProto::OnErase() { DeleteDirectoryTreeW(GetProtoFolder(), false); diff --git a/protocols/Telegram/src/mt_proto.h b/protocols/Telegram/src/mt_proto.h index 45e89bdc55..3c3410cd29 100644 --- a/protocols/Telegram/src/mt_proto.h +++ b/protocols/Telegram/src/mt_proto.h @@ -87,6 +87,7 @@ public: int SetStatus(int iNewStatus) override; void OnModulesLoaded() override; + void OnShutdown() override; void OnErase() override; // Services ////////////////////////////////////////////////////////////////////////// diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index 0bdeb2d79b..4d45416ab7 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -25,7 +25,7 @@ void __cdecl CMTProto::ServerThread(void *) SendQuery(new td::td_api::getOption("version")); while (!m_bTerminated) { - ProcessResponse(m_pClientMmanager->receive(10)); + ProcessResponse(m_pClientMmanager->receive(1)); } m_bRunning = false; -- cgit v1.2.3