mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-23 19:25:54 +01:00
Send less updates repeatedly in getUpdates.
This commit is contained in:
parent
bb8b7a6702
commit
c1db2380bd
@ -8518,6 +8518,9 @@ td::Status Client::process_get_updates_query(PromisedQueryPtr &query) {
|
||||
if (offset == previous_get_updates_offset_ && timeout < 3 && now < previous_get_updates_start_time_ + 3.0) {
|
||||
timeout = 3;
|
||||
}
|
||||
if (offset == previous_get_updates_offset_ && now < previous_get_updates_start_time_ + 0.5) {
|
||||
limit = 1;
|
||||
}
|
||||
previous_get_updates_offset_ = offset;
|
||||
previous_get_updates_start_time_ = now;
|
||||
do_get_updates(offset, limit, timeout, std::move(query));
|
||||
|
Loading…
Reference in New Issue
Block a user