From 00db449475bcb1d57d171762980978be0c07e5e8 Mon Sep 17 00:00:00 2001 From: yf <29323003@qq.com> Date: Mon, 26 Nov 2018 13:05:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E7=90=86=E6=80=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Pool/AbstractPool.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Pool/AbstractPool.php b/src/Pool/AbstractPool.php index 7ff0bb0..4d7dca6 100644 --- a/src/Pool/AbstractPool.php +++ b/src/Pool/AbstractPool.php @@ -30,7 +30,9 @@ public function __construct($maxNum = 10,$intervalCheckTime = 30*1000,$idleGCTim $this->max = $maxNum; $this->intervalCheckTime = $intervalCheckTime; $this->idleGCTime = $idleGCTime; - swoole_timer_tick($intervalCheckTime,[$this,'intervalCheck']); + if($intervalCheckTime > 0){ + swoole_timer_tick($intervalCheckTime,[$this,'intervalCheck']); + } } /*