From 3c3ba68abadca8bbf0b599e43fb3f6be14db32e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 5 Jul 2021 16:55:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Pool/ClientsPool.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/System/Pool/ClientsPool.php b/System/Pool/ClientsPool.php index 5b8d1e35..3fbacfd1 100644 --- a/System/Pool/ClientsPool.php +++ b/System/Pool/ClientsPool.php @@ -109,8 +109,12 @@ class ClientsPool extends Component } $total += $length; } + write(var_export($num,true),'connections'); if ($total < 1) { Timer::clear($this->creates); + if (Snowflake::isWorker() || Snowflake::isTask()){ + $this->debug('Worker #' . env('worker') . ' clear time tick.'); + } $this->creates = -1; } } @@ -125,10 +129,6 @@ class ClientsPool extends Component { $this->pop($channel, $retain_number); static::$_connections = []; - if ($retain_number == 0) { - Timer::clear($this->creates); - $this->creates = -1; - } }