diff --git a/src/Worker.php b/src/Worker.php index 35d7d488..bf89da2e 100644 --- a/src/Worker.php +++ b/src/Worker.php @@ -49,7 +49,7 @@ class Worker * * @var string */ - public const VERSION = '5.0.0-beta.6'; + public const VERSION = '5.0.0-beta.7'; /** * Status starting. @@ -1441,6 +1441,9 @@ protected static function forkWorkersForWindows(): void restore_error_handler(); + // Add an empty timer to prevent the event-loop from exiting. + Timer::add(1000000, function (){}); + // Display UI. static::safeEcho(str_pad($worker->name, 48) . str_pad($worker->getSocketName(), 36) . str_pad('1', 10) . " [ok]\n"); $worker->listen();