From d8584132d2cf0ee0b700f5d27631818199849ef5 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 4 Sep 2021 00:08:33 +0800 Subject: [PATCH] 111 --- src/Mysql/PDO.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mysql/PDO.php b/src/Mysql/PDO.php index 3825e6d..34b4c98 100644 --- a/src/Mysql/PDO.php +++ b/src/Mysql/PDO.php @@ -72,13 +72,13 @@ class PDO implements StopHeartbeatCheck */ public function heartbeat_check(): void { - if (env('state') == 'exit') { + if (env('state','start') == 'exit') { return; } if ($this->_timer === -1 && Context::inCoroutine()) { $this->_timer = Timer::tick(1000, function () { try { - if (env('state') == 'exit') { + if (env('state','start') == 'exit') { echo 'timer end.' . PHP_EOL; $this->stopHeartbeatCheck(); }