This commit is contained in:
2023-07-26 17:48:34 +08:00
parent 4a667a7596
commit 1dedaa52cc
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -197,6 +197,7 @@ class AsyncServer implements ServerInterface
public function onSigint($no, array $signInfo): void
{
try {
Logger::_alert("");
Logger::_alert('Pid ' . getmypid() . ' get signo ' . $no);
$this->shutdown();
} catch (\Throwable $exception) {
+1 -2
View File
@@ -85,7 +85,7 @@ trait TraitServer
*/
private function onPcntlSignal($signal, $callback): void
{
pcntl_signal(SIGINT, [$this, 'onSigint']);
pcntl_signal($signal, $callback);
}
@@ -101,7 +101,6 @@ trait TraitServer
/**
* @param array $ports
* @return array
* @throws ReflectionException
*/
public function sortService(array $ports): array
{