This commit is contained in:
2021-03-02 13:53:43 +08:00
parent 301db74a51
commit cf62b0f0ba
+2 -2
View File
@@ -26,7 +26,7 @@ class OnWorkerStart extends Callback
{ {
/** @var int 重启信号 */ /** @var int 重启信号 */
private int $signal = SIGUSR1 | SIGUSR2; private int $signal = SIGUSR1 | SIGUSR2 | SIGKILL | SIGTERM;
/** /**
@@ -95,7 +95,7 @@ class OnWorkerStart extends Callback
*/ */
public function onSignal(Server $server, $worker_id): mixed public function onSignal(Server $server, $worker_id): mixed
{ {
$ret = Coroutine::waitSignal($this->signal, 1); $ret = Coroutine::waitSignal($this->signal, -1);
Runtime::enableCoroutine(false); Runtime::enableCoroutine(false);
if ($ret === true) { if ($ret === true) {