Unbreak traffic shaper in the fault injector.

v0.7.x
whitequark 2017-08-31 21:39:01 +00:00
parent b585fbd368
commit f8edf0faea
1 changed files with 1 additions and 1 deletions

View File

@ -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;