mirror of
https://github.com/smoltcp-rs/smoltcp.git
synced 2025-09-30 06:10:55 +00:00
Unbreak traffic shaper in the fault injector.
This commit is contained in:
parent
017210ea28
commit
dc94c35da3
@ -48,7 +48,7 @@ impl State {
|
||||
}
|
||||
|
||||
fn refill(&mut self, config: &Config, timestamp: u64) {
|
||||
if self.refilled_at - timestamp > config.interval {
|
||||
if timestamp - self.refilled_at > config.interval {
|
||||
self.tx_bucket = config.max_tx_rate;
|
||||
self.rx_bucket = config.max_rx_rate;
|
||||
self.refilled_at = timestamp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user