diff --git a/src/Server/Manager.php b/src/Server/Manager.php index 80dcf68..67a63c2 100644 --- a/src/Server/Manager.php +++ b/src/Server/Manager.php @@ -99,7 +99,9 @@ public function signalHandler($signal) case SIGUSR2: case SIGTERM: $this->exit = true; - $this->client->close(true); + if ($this->client->isConnected()) { + $this->client->close(true); + } file_put_contents(Configure::getPosFile(), $pidFileContent); exit(0); }