From ee39e8abe9e07e5051ae1cfe356ba391e2f1b749 Mon Sep 17 00:00:00 2001 From: bingcool <2437667702@qq.com> Date: Sun, 16 Apr 2023 15:35:46 +0800 Subject: [PATCH] =?UTF-8?q?optimze:=20=E4=BC=98=E5=8C=96goApp=E7=9A=84?= =?UTF-8?q?=E5=8D=8F=E7=A8=8B=E5=8D=95=E4=BE=8B=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Core/Func/function.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Func/function.php b/src/Core/Func/function.php index 48f540e5..1b2390d4 100644 --- a/src/Core/Func/function.php +++ b/src/Core/Func/function.php @@ -152,7 +152,7 @@ function getOneFreePort(array $excludePorts = []): int * @throws \Swoolefy\Exception\SystemException */ function goApp(\Closure $callback) { - go(function () use($callback) { + \Swoole\Coroutine::create(function () use($callback) { (new \Swoolefy\Core\EventApp)->registerApp(function($event) use($callback) { try { $callback($event);