From 3b5030144ba2a85b5c505f757976170ec3e4bed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 2 Mar 2021 15:30:10 +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 --- HttpServer/Events/OnWorkerStart.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index 165f806c..fec46ec4 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -22,11 +22,6 @@ use Swoole\Server; class OnWorkerStart extends Callback { - /** @var int 重启信号 */ - private int $signal = SIGUSR1 | SIGKILL | SIGKILL; - - - /** * @param Server $server * @param int $worker_id @@ -46,7 +41,6 @@ class OnWorkerStart extends Callback } $this->debug(sprintf('%s #%d Pid:%d start.', ucfirst(env('environmental')), $worker_id, $server->worker_pid)); - Coroutine\go([$this, 'onSignal'], $server, $worker_id); } @@ -85,21 +79,6 @@ class OnWorkerStart extends Callback } - /** - * @param $server - * @param $worker_id - * @return void - */ - public function onSignal(Server $server, $worker_id): mixed - { - $ret = Coroutine::waitSignal($this->signal, -1); - if ($ret === true) { - $this->ticker(); - } - return $server->stop(); - } - - /** * @return void */