Add time limit for applying of pending PTS updates.

This commit is contained in:
levlam 2022-11-27 00:59:09 +03:00
parent d6842ced1b
commit c8507ec16a

View File

@ -2563,6 +2563,11 @@ void UpdatesManager::process_postponed_pts_updates() {
continue; continue;
} }
if (Time::now() - begin_time >= td::min(UPDATE_APPLY_WARNING_TIME / 2, 0.1)) {
// the updates will be applied or skipped later; reget the remaining updates through getDifference
break;
}
auto last_update_it = update_it; auto last_update_it = update_it;
for (int32 i = 1; true; i++) { for (int32 i = 1; true; i++) {
++last_update_it; ++last_update_it;