modify
This commit is contained in:
@@ -64,7 +64,6 @@ class OnWorkerStart extends Callback
|
||||
public function onTaskSignal(Server $server, int $workerId)
|
||||
{
|
||||
try {
|
||||
var_dump(Coroutine::waitPid($server->worker_id));
|
||||
$sigkill = Coroutine::waitSignal(SIGTERM | SIGKILL | SIGUSR2 | SIGUSR1);
|
||||
var_dump($sigkill);
|
||||
if ($sigkill !== false) {
|
||||
@@ -72,6 +71,10 @@ class OnWorkerStart extends Callback
|
||||
Coroutine::sleep(1);
|
||||
}
|
||||
}
|
||||
go(function () use ($server) {
|
||||
var_dump(Coroutine::waitPid($server->worker_id));
|
||||
|
||||
});
|
||||
$server->stop($workerId, true);
|
||||
} catch (\Throwable $exception) {
|
||||
$this->addError($exception);
|
||||
|
||||
Reference in New Issue
Block a user