diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 96b6eccf..237d8f89 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -3472,6 +3472,7 @@ void FileManager::memory_cleanup() { auto &node = file_nodes_[main_node_id]; if (node != nullptr && ((int32) i) == node->main_file_id_.get()) { if (time - file_id_insert_time_[i] > 60 * 5 /* MAIN FILE TTL */) { + file_id_insert_time_[i] = INT64_MAX; for (auto &file_id : node->file_ids_) { /* DESTROY ASSOCIATED QUERIES */ for (auto &query_id : queries_container_.ids()) {