From 483ce85ef9c8f6ac8c216ffc1bf2de0e14cac34c Mon Sep 17 00:00:00 2001 From: Alex Renoki Date: Fri, 8 Jan 2021 10:27:11 +0200 Subject: [PATCH] Don't trigger soft shutdown if no pcntl is existent. --- src/Console/Commands/StartServer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Console/Commands/StartServer.php b/src/Console/Commands/StartServer.php index 890a4f1..f9bb71c 100644 --- a/src/Console/Commands/StartServer.php +++ b/src/Console/Commands/StartServer.php @@ -172,6 +172,10 @@ class StartServer extends Command // to receive new connections, close the current connections, // then stopping the loop. + if (! extension_loaded('pcntl')) { + return; + } + $this->loop->addSignal(SIGTERM, function () { $this->line('Closing existing connections...');