From 77e772d9a039cf99f46726d0c4feebfeb4660350 Mon Sep 17 00:00:00 2001 From: whiteCcinn <471113744@qq.com> Date: Tue, 27 Mar 2018 18:19:04 +0800 Subject: [PATCH] fix process core-dump bug --- src/Bootstrap/Listeners/BeforeStartListener.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Bootstrap/Listeners/BeforeStartListener.php b/src/Bootstrap/Listeners/BeforeStartListener.php index b3d661bb..d6d0ba95 100644 --- a/src/Bootstrap/Listeners/BeforeStartListener.php +++ b/src/Bootstrap/Listeners/BeforeStartListener.php @@ -2,6 +2,7 @@ namespace Swoft\Process\Bootstrap\Listeners; +use Swoft\App; use Swoft\Bean\Annotation\BeforeStart; use Swoft\Bootstrap\Listeners\Interfaces\BeforeStartInterface; use Swoft\Bootstrap\Server\AbstractServer; @@ -36,7 +37,9 @@ private function addProcess(AbstractServer &$server) $name = $processInfo['name']; $boot = $processInfo['boot']; - if (!$boot) { + $processObject = App::getBean($name); + + if (!$processObject->check() || !$boot) { continue; }