modify plugin name

This commit is contained in:
2022-07-11 17:45:15 +08:00
parent 0c54dfe2af
commit e7ace87826
+2 -16
View File
@@ -85,23 +85,9 @@ abstract class BaseProcess implements OnProcessInterface
/** /**
* * @return $this
*/ */
public function onSigterm(): static abstract public function onSigterm(): static;
{
if (!Context::inCoroutine()) {
Process::signal(SIGTERM, fn($data) => $this->onShutdown($data));
} else {
$listen = function () {
$data = Coroutine::waitSignal(SIGTERM, -1);
if ($data) {
$this->onShutdown($data);
}
};
Coroutine::create($listen);
}
return $this;
}
/** /**