Randomize poll polling timeout.

GitOrigin-RevId: 7b8980da0fc1193361b729189e663d9a89456e3b
This commit is contained in:
levlam 2019-03-10 11:00:14 +03:00
parent ac95df0213
commit 2e520364ad

View File

@ -737,7 +737,8 @@ void PollManager::stop_local_poll(PollId poll_id) {
} }
double PollManager::get_polling_timeout() const { double PollManager::get_polling_timeout() const {
return td_->is_online() ? 60 : 30 * 60; double result = td_->is_online() ? 60 : 30 * 60;
return result * Random::fast(70, 100) * 0.01;
} }
void PollManager::on_update_poll_timeout(PollId poll_id) { void PollManager::on_update_poll_timeout(PollId poll_id) {