diff options
| author | levlam <levlam@telegram.org> | 2020-07-16 22:36:59 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2020-07-16 22:36:59 +0300 |
| commit | 3f2e2691628f2265fec0043c8868317aec1bbd5e (patch) | |
| tree | 3ce775ce258713a4f6adb4f4313234bfd700fa0a /tdutils/td/utils/FloodControlFast.h | |
| parent | 2a5c82611100fd73e4aa5bbfefd632cdb0e3d9d3 (diff) | |
Fix FloodControlStrict.
GitOrigin-RevId: 664841f3e58cce5bce3ad90ef42f23537dc07c16
Diffstat (limited to 'tdutils/td/utils/FloodControlFast.h')
| -rw-r--r-- | tdutils/td/utils/FloodControlFast.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tdutils/td/utils/FloodControlFast.h b/tdutils/td/utils/FloodControlFast.h index b7ee3c93e..c1538eb2a 100644 --- a/tdutils/td/utils/FloodControlFast.h +++ b/tdutils/td/utils/FloodControlFast.h @@ -13,16 +13,16 @@ namespace td { class FloodControlFast { public: - uint32 add_event(int32 now) { + void add_event(int32 now) { for (auto &limit : limits_) { limit.stat_.add_event(CounterStat::Event(), now); if (limit.stat_.get_stat(now).count_ > limit.count_) { wakeup_at_ = max(wakeup_at_, now + limit.duration_ * 2); } } - return wakeup_at_; } - uint32 get_wakeup_at() { + + uint32 get_wakeup_at() const { return wakeup_at_; } |
