From 34f8aaaca5d6598039bed3609d76d239fb171737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 6 Dec 2021 15:47:11 +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 --- src/Mysql/PDO.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mysql/PDO.php b/src/Mysql/PDO.php index b01ae6f..5cc0732 100644 --- a/src/Mysql/PDO.php +++ b/src/Mysql/PDO.php @@ -3,6 +3,7 @@ namespace Database\Mysql; use Exception; +use Kiri\Abstracts\Config; use Kiri\Abstracts\Logger; use Kiri\Kiri; use Kiri\Pool\StopHeartbeatCheck; @@ -82,7 +83,7 @@ class PDO implements StopHeartbeatCheck Kiri::getDi()->get(Logger::class)->critical('timer end'); $this->stopHeartbeatCheck(); } - if (time() - $this->_last > 10 * 60) { + if (time() - $this->_last > (int)Config::get('databases.pool.tick',60)) { $this->stopHeartbeatCheck(); $this->pdo = null; }