Update src/adaptors/throttle.rs

Co-authored-by: Waffle Lapkin <waffle.lapkin@gmail.com>
This commit is contained in:
Temirkhan Myrzamadi 2021-02-15 22:44:19 +03:00 committed by GitHub
parent d58b21c42f
commit 916a774c88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ use crate::{
// //
// 4. Clear the history from records whose time < (current time - minute). // 4. Clear the history from records whose time < (current time - minute).
// //
// 5. Count all requests which were sent last second, `allowed = limit.overall_s // 5. Count all requests which were sent last second, `allowed = limit.messages_per_sec_overall
// - count`. // - count`.
// //
// 6. If `allowed == 0` wait a bit and `continue` to the next iteration. // 6. If `allowed == 0` wait a bit and `continue` to the next iteration.