diff --git a/kiri-engine/Pool/Pool.php b/kiri-engine/Pool/Pool.php index 953b373f..7ba76396 100644 --- a/kiri-engine/Pool/Pool.php +++ b/kiri-engine/Pool/Pool.php @@ -41,8 +41,9 @@ class Pool extends Component */ public function flush($name, $retain_number) { - $channel = $this->channel($name); - $this->pop($channel, $retain_number); + if ($this->hasChannel($name)) { + $this->pop($this->channel($name), $retain_number); + } }