From 008fc6e10106f46df065d269961ad6c6621cae56 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 6 Aug 2020 21:28:44 +0300 Subject: [PATCH] Rename Client::destroy to close. GitOrigin-RevId: 9780492da143c2a79877ea8ff0868a9a232d9844 --- td/telegram/Client.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/td/telegram/Client.cpp b/td/telegram/Client.cpp index 8f7fc03ef..d667131c9 100644 --- a/td/telegram/Client.cpp +++ b/td/telegram/Client.cpp @@ -60,7 +60,7 @@ class MultiTd : public Actor { send_closure(td, &Td::request, request_id, std::move(function)); } - void destroy(int32 td_id) { + void close(int32 td_id) { auto size = tds_.erase(td_id); CHECK(size == 1); } @@ -321,9 +321,9 @@ class MultiImpl { send_closure(multi_td_, &MultiTd::send, client_id, request_id, std::move(function)); } - void destroy(int32 td_id) { + void close(int32 td_id) { auto guard = concurrent_scheduler_->get_send_guard(); - send_closure(multi_td_, &MultiTd::destroy, td_id); + send_closure(multi_td_, &MultiTd::close, td_id); } ~MultiImpl() { @@ -412,7 +412,7 @@ class MultiClient::Impl final { Impl &operator=(Impl &&) = delete; ~Impl() { for (auto &it : impls_) { - it.second->destroy(it.first); + it.second->close(it.first); } while (!impls_.empty()) { receive(10); @@ -462,7 +462,7 @@ class Client::Impl final { Impl(Impl &&) = delete; Impl &operator=(Impl &&) = delete; ~Impl() { - multi_impl_->destroy(td_id_); + multi_impl_->close(td_id_); while (!is_closed_) { receive(10); }