From b1d517398d46220eec934f62ae6799866d9cc34f Mon Sep 17 00:00:00 2001 From: WofWca Date: Sat, 23 Sep 2023 20:46:17 +0400 Subject: [PATCH] refactor: improve comment about `Ratelimit` A few people got the impression that if you send 6 messages in a burst you'll only be able to send the next one in 60 seconds. Hopefully this can resolve it. --- src/context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context.rs b/src/context.rs index 78c0ed47f..d1300f7fa 100644 --- a/src/context.rs +++ b/src/context.rs @@ -382,7 +382,7 @@ impl Context { translated_stockstrings: stockstrings, events, scheduler: SchedulerState::new(), - ratelimit: RwLock::new(Ratelimit::new(Duration::new(60, 0), 6.0)), // Allow to send 6 messages immediately, no more than once every 10 seconds. + ratelimit: RwLock::new(Ratelimit::new(Duration::new(60, 0), 6.0)), // Allow at least 1 message every 10 seconds + a burst of 6. quota: RwLock::new(None), quota_update_request: AtomicBool::new(false), resync_request: AtomicBool::new(false),