Don't try to fetch the same update more than once.

This commit is contained in:
levlam 2024-01-26 14:01:44 +03:00
parent b6fe959ece
commit 3391c643f3
2 changed files with 7 additions and 0 deletions

View File

@ -337,6 +337,12 @@ void UpdatesManager::repair_pts_gap() {
if (it->second.pts != pts + it->second.pts_count) {
return;
}
if (last_fetched_pts_ == pts) {
VLOG(get_difference) << "Don't fetch again update with PTS = " << pts;
return;
}
last_fetched_pts_ = pts;
VLOG(get_difference) << "Fetch update with PTS = " << pts;
pts_short_gap_++;
auto promise =

View File

@ -215,6 +215,7 @@ class UpdatesManager final : public Actor {
int32 pts_fixed_short_gap_ = 0;
int32 pts_gap_ = 0;
int32 pts_diff_ = 0;
int32 last_fetched_pts_ = 0;
int32 qts_gap_ = 0;
int32 qts_diff_ = 0;