diff --git a/src/Console/Commands/RestartServer.php b/src/Console/Commands/RestartServer.php index bb64c98..90cb643 100644 --- a/src/Console/Commands/RestartServer.php +++ b/src/Console/Commands/RestartServer.php @@ -31,6 +31,8 @@ class RestartServer extends Command */ public function handle() { + \Log::channel('websocket')->info('WebSocket restart server command called ...'); + Cache::forever( 'blax:websockets:restart', $this->currentTime() diff --git a/src/Console/Commands/StartServer.php b/src/Console/Commands/StartServer.php index a50a315..39e4c08 100644 --- a/src/Console/Commands/StartServer.php +++ b/src/Console/Commands/StartServer.php @@ -185,7 +185,10 @@ class StartServer extends Command $this->lastRestart = $this->getLastRestart(); $this->loop->addPeriodicTimer(10, function () { - if ($this->getLastRestart() !== $this->lastRestart) { + if ( + ($this->getLastRestart() . '') + !== ($this->lastRestart . '') + ) { \Log::channel('websocket')->info('Restart detected, triggering soft shutdown...', [ 'previous_restart' => $this->lastRestart, 'current_restart' => $this->getLastRestart(),