Skip to content

Commit

Permalink
Ignore getDifference errors while closing.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Jan 18, 2021
1 parent f37f9a7 commit e72c129
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions td/telegram/UpdatesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ void UpdatesManager::fill_gap(void *td, const char *source) {
}

void UpdatesManager::get_difference(const char *source) {
if (G()->close_flag()) {
return;
}
if (get_pts() == -1) {
init_state();
return;
Expand Down Expand Up @@ -857,6 +860,9 @@ void UpdatesManager::on_get_updates(tl_object_ptr<telegram_api::Updates> &&updat
}

void UpdatesManager::on_failed_get_updates_state(Status &&error) {
if (G()->close_flag()) {
return;
}
if (error.code() != 401) {
LOG(ERROR) << "Receive updates.getState error: " << error;
}
Expand All @@ -866,6 +872,9 @@ void UpdatesManager::on_failed_get_updates_state(Status &&error) {
}

void UpdatesManager::on_failed_get_difference(Status &&error) {
if (G()->close_flag()) {
return;
}
if (error.code() != 401) {
LOG(ERROR) << "Receive updates.getDifference error: " << error;
}
Expand Down

0 comments on commit e72c129

Please sign in to comment.