diff --git a/src/Command/PuzzleRelayCommand.php b/src/Command/PuzzleRelayCommand.php index a654656..71e66af 100644 --- a/src/Command/PuzzleRelayCommand.php +++ b/src/Command/PuzzleRelayCommand.php @@ -66,6 +66,15 @@ final class PuzzleRelayCommand extends Command Worker::$logFile = $logDir.'/puzzle-relay.log'; Worker::$pidFile = $logDir.'/puzzle-relay.pid'; Worker::$stdoutFile = $logDir.'/puzzle-relay-stdout.log'; + // On Linux, Worker::runAll() parses start/stop/restart/... off the + // real $argv - which here holds Symfony console's own arguments + // (bin/console app:puzzle-relay), not a command it recognizes, so it + // printed its usage text and exited immediately. This is Workerman's + // own escape hatch for exactly that: getArgv() appends $command's + // words to $argv before parsing, without touching $argv itself. + // (Windows skips this argv parsing entirely, which is why local dev + // never hit it.) + Worker::$command = 'start'; $worker = new Worker("websocket://{$this->listenAddress}"); $worker->onConnect = static function (TcpConnection $connection): void {