Skip to content

Commit

Permalink
Update accumulated_pts_count_ when a pending pts update is processed.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Aug 16, 2021
1 parent c19a075 commit 7ac3c2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions td/telegram/UpdatesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,12 @@ void UpdatesManager::process_pending_pts_updates() {
td_->messages_manager_->process_pts_update(std::move(update.update));
set_pts(update.pts, "process_pending_pts_updates")
.set_value(Unit()); // TODO can't set until data are really stored on persistent storage

if (accumulated_pts_ != -1) {
CHECK(update.pts <= accumulated_pts_);
CHECK(accumulated_pts_count_ >= update.pts_count);
accumulated_pts_count_ -= update.pts_count;
}
}
update.promise.set_value(Unit());
pending_pts_updates_.erase(update_it);
Expand Down

0 comments on commit 7ac3c2b

Please sign in to comment.