stanley-king 3 年之前
父节点
当前提交
6e47b3f5c1
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1 0
      helper/refill/policy/chctl.php
  2. 2 2
      helper/refill/policy/ctl_item.php

+ 1 - 0
helper/refill/policy/chctl.php

@@ -127,6 +127,7 @@ class chctl
         {
         {
             if($item->opened()) {
             if($item->opened()) {
                 $usable_items[] = $item;
                 $usable_items[] = $item;
+                $item->calc_speed();
             } else {
             } else {
                 Log::record("key={$key} has not opened",Log::DEBUG);
                 Log::record("key={$key} has not opened",Log::DEBUG);
             }
             }

+ 2 - 2
helper/refill/policy/ctl_item.php

@@ -101,7 +101,7 @@ class ctl_item
         } elseif ($this->mMaxSpeed == 0) {
         } elseif ($this->mMaxSpeed == 0) {
             return true;
             return true;
         } else {
         } else {
-            return $this->cur_speed() >= $this->mMaxSpeed;
+            return $this->lazy_speed() >= $this->mMaxSpeed;
         }
         }
     }
     }
 
 
@@ -112,7 +112,7 @@ class ctl_item
 
 
     public function lazy_speed()
     public function lazy_speed()
     {
     {
-        return $this->cur_speed();
+        return $this->mLazySpeed;
     }
     }
 
 
     public function name()
     public function name()