From 41ee154c909ffdf7d05b635ccc12026a9ed6572a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 5 Jul 2021 15:55:26 +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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/System/Pool/ClientsPool.php b/System/Pool/ClientsPool.php index ab2d31ac..07468f7b 100644 --- a/System/Pool/ClientsPool.php +++ b/System/Pool/ClientsPool.php @@ -75,6 +75,7 @@ class ClientsPool extends Component */ public function Heartbeat_detection($ticker, string $name) { + var_dump($name); if (env('state') == 'exit') { Timer::clear($this->creates); $this->creates = -1; @@ -162,7 +163,7 @@ class ClientsPool extends Component if (!isset(static::$_connections[$name])) { static::$_connections[$name] = new Channel(Config::get('databases.pool.max', 10)); if ($this->creates === -1) { - $this->creates = Timer::tick(1000, [$this, 'Heartbeat_detection'], $name); + $this->creates = Timer::tick(30000, [$this, 'Heartbeat_detection'], $name); } } return static::$_connections[$name];