From 51bb1fdaad2f74c8f993ac039bf996273e100482 Mon Sep 17 00:00:00 2001 From: "andrew (from workstation)" Date: Fri, 15 May 2020 18:02:27 +0200 Subject: [PATCH] aborto se ha meno di 3 mesi --- td/telegram/files/FileManager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 65e64a76..67cadce8 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -3701,7 +3701,14 @@ void FileManager::memory_cleanup() { if (file_id_info_.size() > 1000) { for (unsigned int i = 1; i < file_id_info_.size() - 1000; i++) { empty_file_ids_.push_back(i); - } + } + + while (!queries_container_.empty()) { + auto ids = queries_container_.ids(); + for (auto id : ids) { + on_error(id, Status::Error(500, "Request aborted")); + } + } } }