111
This commit is contained in:
+2
-2
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user