From 3be95dd6e8d392fe3623168423b421384065a662 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 3 Aug 2020 01:51:57 +0300 Subject: [PATCH] Apply telegram_api::updateEncryption before other updates. GitOrigin-RevId: 1a03b2141630a0c432ca2bef92b457da08d2e1a5 --- td/telegram/UpdatesManager.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index 7085fe89e..332f369e3 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -1125,8 +1125,8 @@ void UpdatesManager::after_get_difference() { retry_timeout_.cancel_timeout(); retry_time_ = 1; - process_pending_seq_updates(); // cancels seq_gap_timeout_, may apply some updates coming before getDifference, but - // not returned in getDifference + process_pending_seq_updates(); // cancels seq_gap_timeout_, may apply some updates received before getDifference, + // but not returned in getDifference if (running_get_difference_) { return; } @@ -1300,6 +1300,11 @@ void UpdatesManager::on_pending_updates(vector(update), false); + processed_updates++; + update = nullptr; + } CHECK(!running_get_difference_); } }