diff --git a/server/src/websocket/server.rs b/server/src/websocket/server.rs index fc838c1..bf3249e 100644 --- a/server/src/websocket/server.rs +++ b/server/src/websocket/server.rs @@ -318,11 +318,9 @@ impl ChatServer { }; rate_limit.last_checked = current; - if !check_only { - rate_limit.allowance += time_passed * (rate as f64 / per as f64); - if rate_limit.allowance > rate as f64 { - rate_limit.allowance = rate as f64; - } + rate_limit.allowance += time_passed * (rate as f64 / per as f64); + if !check_only && rate_limit.allowance > rate as f64 { + rate_limit.allowance = rate as f64; } if rate_limit.allowance < 1.0 {