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; }