eee
This commit is contained in:
+2
-10
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user