From ea2afdf9a6f9e1a39a17975bf4ab27d43d127bdf Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 5 Apr 2018 23:26:58 +0300 Subject: [PATCH] Fix td_api::close and td_api::responses. GitOrigin-RevId: 43c3e6cbec56c8ce69abaaa1cf8aec7221aa3f4c --- td/telegram/Td.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 2226f595..e6f20a42 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -4910,13 +4910,15 @@ void Td::on_request(uint64 id, const td_api::logOut &request) { } void Td::on_request(uint64 id, const td_api::close &request) { - close(); + // send response before actually closing send_closure(actor_id(this), &Td::send_result, id, td_api::make_object()); + close(); } void Td::on_request(uint64 id, const td_api::destroy &request) { - destroy(); + // send response before actually destroying send_closure(actor_id(this), &Td::send_result, id, td_api::make_object()); + destroy(); } void Td::on_request(uint64 id, td_api::checkAuthenticationBotToken &request) {