summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-12-14 19:20:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-12-14 19:20:21 +0300
commitb1991e51d5c53383e4cf2bb8fc1830eef7ed20b8 (patch)
treeb66a7440187ad9680c6e476f77b835a2cbb1e156 /protocols/Telegram/src
parente96460d6ec66dd02a32e9667333b3f2e418519f8 (diff)
fixes #3264 (Telegram: учётка не удаляется из настроек)
Diffstat (limited to 'protocols/Telegram/src')
-rw-r--r--protocols/Telegram/src/mt_proto.cpp5
-rw-r--r--protocols/Telegram/src/mt_proto.h1
-rw-r--r--protocols/Telegram/src/server.cpp2
3 files changed, 7 insertions, 1 deletions
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;