This commit is contained in:
2023-07-31 23:08:58 +08:00
parent 2b2a779b94
commit ba3df62cb5
11 changed files with 70 additions and 137 deletions
-1
View File
@@ -27,7 +27,6 @@ class OnServer extends Server
/**
* @param SServer $server
* @throws ConfigException
* @throws ReflectionException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
+1 -2
View File
@@ -87,8 +87,7 @@ class OnServerWorker extends \Kiri\Server\Abstracts\Server
*/
public function onWorkerError(Server $server, int $worker_id, int $worker_pid, int $exit_code, int $signal): void
{
$dispatch = \Kiri::getDi()->get(EventDispatch::class);
$dispatch->dispatch(new OnWorkerError($server, $worker_id, $worker_pid, $exit_code, $signal));
event(new OnWorkerError($server, $worker_id, $worker_pid, $exit_code, $signal));
$message = sprintf('Worker#%d::%d error stop. signal %d, exit_code %d, msg %s',
$worker_id, $worker_pid, $signal, $exit_code, swoole_strerror(swoole_last_error(), 9)