mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
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.
This commit is contained in:
@@ -382,7 +382,7 @@ impl Context {
|
|||||||
translated_stockstrings: stockstrings,
|
translated_stockstrings: stockstrings,
|
||||||
events,
|
events,
|
||||||
scheduler: SchedulerState::new(),
|
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: RwLock::new(None),
|
||||||
quota_update_request: AtomicBool::new(false),
|
quota_update_request: AtomicBool::new(false),
|
||||||
resync_request: AtomicBool::new(false),
|
resync_request: AtomicBool::new(false),
|
||||||
|
|||||||
Reference in New Issue
Block a user