diff options
-rw-r--r-- | protocols/Telegram/src/mt_proto.cpp | 5 | ||||
-rw-r--r-- | protocols/Telegram/src/mt_proto.h | 1 | ||||
-rw-r--r-- | protocols/Telegram/src/server.cpp | 2 |
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; |