diff --git a/HttpServer/Abstracts/Callback.php b/HttpServer/Abstracts/Callback.php index b232b869..8a3ea291 100644 --- a/HttpServer/Abstracts/Callback.php +++ b/HttpServer/Abstracts/Callback.php @@ -33,8 +33,6 @@ abstract class Callback extends HttpService protected function clear($server, $worker_id, $message) { try { - Timer::clearAll(); - fire(Event::SYSTEM_RESOURCE_CLEAN); \logger()->insert(); diff --git a/System/Abstracts/Pool.php b/System/Abstracts/Pool.php index c93c1dbe..9f5595bc 100644 --- a/System/Abstracts/Pool.php +++ b/System/Abstracts/Pool.php @@ -272,11 +272,11 @@ abstract class Pool extends Component */ public function clean(string $name) { - Timer::clear($this->creates); - if (!Context::inCoroutine()) { - return; + var_dump($name); + if (Timer::exists($this->creates)) { + Timer::clear($this->creates); } - if (!isset($this->_items[$name])) { + if (!Context::inCoroutine() || !isset($this->_items[$name])) { return; } $channel = $this->_items[$name];