Improve PTS restore even more.
This commit is contained in:
parent
6b376a71e8
commit
07ece1faea
@ -2733,9 +2733,12 @@ void UpdatesManager::add_pending_pts_update(tl_object_ptr<telegram_api::Update>
|
||||
if (new_pts < old_pts - 99 && source != AFTER_GET_DIFFERENCE_SOURCE) {
|
||||
bool need_restore_pts = new_pts < old_pts - 19999;
|
||||
auto now = Time::now();
|
||||
if (old_pts == 2100000000 && new_pts < 1100000000 && pts_count <= 10000) {
|
||||
if (old_pts == 2100000000 && new_pts < 1100000000 && pts_count <= 10000 &&
|
||||
td_->option_manager_->get_option_integer("session_count") > 1) {
|
||||
set_pts(1, "restore PTS");
|
||||
old_pts = get_pts();
|
||||
set_pts_gap_timeout(0.001);
|
||||
return promise.set_value(Unit());
|
||||
} else if (now > last_pts_jump_warning_time_ + 1 && (need_restore_pts || now < last_pts_jump_warning_time_ + 5) &&
|
||||
!(old_pts == std::numeric_limits<int32>::max() && running_get_difference_)) {
|
||||
LOG(ERROR) << "Restore PTS after delete_first_messages from " << old_pts << " to " << new_pts
|
||||
|
Loading…
x
Reference in New Issue
Block a user