From e1e44da5b26fdd82bdc36ea8ca480a8999b9c8e0 Mon Sep 17 00:00:00 2001 From: xl Date: Wed, 4 Sep 2024 10:14:29 +0800 Subject: [PATCH] eee --- HotReload.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/HotReload.php b/HotReload.php index 47e6ce8..a6fd815 100644 --- a/HotReload.php +++ b/HotReload.php @@ -8,7 +8,6 @@ use Kiri\Di\Context; use Kiri\Router\Router; use Kiri\Server\Events\OnWorkerStart; use Kiri\Server\Processes\AbstractProcess; -use Swoole\Coroutine; use Swoole\Event; use Swoole\Process; @@ -56,17 +55,10 @@ class HotReload extends AbstractProcess /** - * @return $this + * @return void */ - public function onSigterm(): static + public function onSigterm(): void { - // TODO: Implement onSigterm() method. - if (Context::inCoroutine()) { - Coroutine::create(fn () => $this->onShutdown(Coroutine::waitSignal(SIGTERM | SIGINT))); - } else { - \pcntl_signal(SIGTERM, [$this, 'onStop']); - } - return $this; }