From 458c6cbd223d533745c9c121a315ee93afae49a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 3 Dec 2021 16:05:49 +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 --- ServerCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ServerCommand.php b/ServerCommand.php index 51db86b..7a0f5ca 100644 --- a/ServerCommand.php +++ b/ServerCommand.php @@ -87,7 +87,7 @@ class ServerCommand extends Command Coroutine::set([ 'hook_flags' => SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_BLOCKING_FUNCTION, 'enable_deadlock_check' => FALSE, - 'exit_condition' => function () { + 'exit_condition' => static function () { return Coroutine::stats()['coroutine_num'] === 0; } ]);