mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-05 19:33:35 +00:00
Fixed possible crash on huge timer tick for polls with close date.
This commit is contained in:
@@ -4489,7 +4489,9 @@ void Session::checkPollsClosings() {
|
||||
}
|
||||
}
|
||||
if (closest) {
|
||||
_pollsClosingTimer.callOnce((closest - now) * crl::time(1000));
|
||||
constexpr auto kMaxTimeout = 24 * 3600 * crl::time(1000);
|
||||
_pollsClosingTimer.callOnce(
|
||||
std::min((closest - now) * crl::time(1000), kMaxTimeout));
|
||||
} else {
|
||||
_pollsClosingTimer.cancel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user