eee
This commit is contained in:
@@ -38,7 +38,7 @@ class Etcd extends Component
|
||||
}
|
||||
|
||||
$key = 'center.service.' . gethostbyname(gethostname());
|
||||
pcntl_signal(SIGINT, function () use ($key) {
|
||||
\pcntl_signal(SIGINT, function () use ($key) {
|
||||
$this->isEnd = true;
|
||||
$this->client->del($key);
|
||||
});
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user