郑晓宇 6 years ago
parent
commit
b2d13cab34
2 changed files with 2 additions and 3 deletions
  1. 2 2
      app/Console/Commands/gamematch.php
  2. 0 1
      app/Home/Controllers/GameController.php

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

@@ -76,8 +76,8 @@ class gamematch extends Command
                     "info" => ['room_id'=>$room['room_id'],"players"=>$players],
                 ];
                 //清理房间数据
-                Redis::del($room['room_id'] . '_info','');
-                Redis::del($room['room_id'] . '_questions','');
+                Redis::del([$room['room_id'] . '_info']);
+                Redis::del([$room['room_id'] . '_questions']);
                 Gateway::sendToGroup($room['room_id'], json_encode($message));
                 echo "匹配成功: {$data['client_id']} 、 {$room['client_id']}\n";
 

+ 0 - 1
app/Home/Controllers/GameController.php

@@ -113,7 +113,6 @@ class GameController extends Controller
             return response()->json($response);
         }
 
-
         //获取当前房间问题条数
         $questions = Redis::get($room_id . '_questions');
         if($questions){