From 55064387f45bf1fb15eb76e1ca6ea7d374753cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 16 Sep 2020 01:56:15 +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/Connection.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/System/Pool/Connection.php b/System/Pool/Connection.php index f17c41a2..ac5f189f 100644 --- a/System/Pool/Connection.php +++ b/System/Pool/Connection.php @@ -35,7 +35,6 @@ class Connection extends Pool public function Heartbeat_detection($timer) { $this->creates = $timer; - $this->debug('Db Heartbeat detection ' . var_export($this->hasCreate, true)); if ($this->lastTime == 0) { return; } @@ -207,9 +206,9 @@ class Connection extends Pool */ public function getConnection(array $config, $isMaster = false) { -// if ($this->creates === 0) { -// $this->creates = Timer::tick(10000, [$this, 'Heartbeat_detection']); -// } + if ($this->creates === 0) { + $this->creates = Timer::tick(10000, [$this, 'Heartbeat_detection']); + } [$coroutineId, $coroutineName] = $this->getIndex($config['cds'], $isMaster); if (!isset($this->hasCreate[$coroutineName])) { $this->hasCreate[$coroutineName] = 0;