郑晓宇 6 lat temu
rodzic
commit
3db3b9b999
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/Console/Commands/gamematch.php

+ 1 - 1
app/Console/Commands/gamematch.php

@@ -54,7 +54,7 @@ class gamematch extends Command
                     $message = [
                     $message = [
                         "type" => 'gotomatch',
                         "type" => 'gotomatch',
                     ];
                     ];
-                    if(Gateway::isOnline($robot)){
+                    if($robot && Gateway::isOnline($robot)){
                         Gateway::sendToClient($robot, $message);
                         Gateway::sendToClient($robot, $message);
                         echo "启动机器人: {$robot}\n";
                         echo "启动机器人: {$robot}\n";
                     }
                     }