浏览代码

Unbreak traffic shaper in the fault injector.

whitequark 7 年之前
父节点
当前提交
dc94c35da3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/phy/fault_injector.rs

+ 1 - 1
src/phy/fault_injector.rs

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