Early exit from fill_gap on closing.

GitOrigin-RevId: 1c31a0a673ae9aa6b091361cd3f86a2f3b6a40f2
This commit is contained in:
levlam 2020-02-10 02:56:32 +03:00
parent 945a3a1dc3
commit 190419bf8b

View File

@ -189,6 +189,9 @@ void UpdatesManager::fill_get_difference_gap(void *td) {
void UpdatesManager::fill_gap(void *td, const char *source) { void UpdatesManager::fill_gap(void *td, const char *source) {
CHECK(td != nullptr); CHECK(td != nullptr);
if (G()->close_flag()) {
return;
}
auto updates_manager = static_cast<Td *>(td)->updates_manager_.get(); auto updates_manager = static_cast<Td *>(td)->updates_manager_.get();
LOG(WARNING) << "Filling gap in " << source << " by running getDifference"; LOG(WARNING) << "Filling gap in " << source << " by running getDifference";