This commit is contained in:
2024-04-24 14:31:06 +08:00
parent a761bb3428
commit 6418b3288b
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -39,8 +39,8 @@ class RpcProcess extends BaseProcess
if (Context::inCoroutine()) {
Coroutine::create(fn() => $this->onShutdown(Coroutine::waitSignal(SIGTERM | SIGINT)));
} else {
pcntl_signal(SIGTERM, [$this, 'onStop']);
pcntl_signal(SIGINT, [$this, 'onStop']);
\pcntl_signal(SIGTERM, [$this, 'onStop']);
\pcntl_signal(SIGINT, [$this, 'onStop']);
}
return $this;
}