From b46b108060a0792efb9320e29c07faa03df9a9fc Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 16 Jul 2024 14:11:57 +0300 Subject: [PATCH] Call loop() in close_node. --- td/telegram/files/FileDownloadManager.cpp | 3 +-- td/telegram/files/FileUploadManager.cpp | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/td/telegram/files/FileDownloadManager.cpp b/td/telegram/files/FileDownloadManager.cpp index 8a52800b8..39d5ec34f 100644 --- a/td/telegram/files/FileDownloadManager.cpp +++ b/td/telegram/files/FileDownloadManager.cpp @@ -162,7 +162,6 @@ void FileDownloadManager::on_ok_download(FullLocalFileLocation local, int64 size callback_->on_download_ok(node->query_id_, std::move(local), size, is_new); } close_node(node_id); - loop(); } void FileDownloadManager::on_error(Status status) { @@ -180,7 +179,6 @@ void FileDownloadManager::on_error_impl(NodeId node_id, Status status) { callback_->on_error(node->query_id_, std::move(status)); } close_node(node_id); - loop(); } void FileDownloadManager::hangup_shared() { @@ -199,6 +197,7 @@ void FileDownloadManager::close_node(NodeId node_id) { CHECK(node); query_id_to_node_id_.erase(node->query_id_); nodes_container_.erase(node_id); + loop(); } } // namespace td diff --git a/td/telegram/files/FileUploadManager.cpp b/td/telegram/files/FileUploadManager.cpp index 659abea77..0ec94b4a5 100644 --- a/td/telegram/files/FileUploadManager.cpp +++ b/td/telegram/files/FileUploadManager.cpp @@ -147,7 +147,6 @@ void FileUploadManager::on_ok_upload(FileType file_type, PartialRemoteFileLocati callback_->on_upload_ok(node->query_id_, file_type, std::move(remote), size); } close_node(node_id); - loop(); } void FileUploadManager::on_ok_upload_full(FullRemoteFileLocation remote) { @@ -160,7 +159,6 @@ void FileUploadManager::on_ok_upload_full(FullRemoteFileLocation remote) { callback_->on_upload_full_ok(node->query_id_, std::move(remote)); } close_node(node_id); - loop(); } void FileUploadManager::on_error(Status status) { @@ -178,7 +176,6 @@ void FileUploadManager::on_error_impl(NodeId node_id, Status status) { callback_->on_error(node->query_id_, std::move(status)); } close_node(node_id); - loop(); } void FileUploadManager::hangup_shared() { @@ -197,6 +194,7 @@ void FileUploadManager::close_node(NodeId node_id) { CHECK(node); query_id_to_node_id_.erase(node->query_id_); nodes_container_.erase(node_id); + loop(); } } // namespace td