kk 2 mesiacov pred
rodič
commit
786c6b8322

+ 11 - 0
game-business/src/main/java/com/game/business/task/WebSokcetTask.java

@@ -69,5 +69,16 @@ public class WebSokcetTask {
                 session.getBasicRemote().sendText("ping");
             }
         }
+
+
+        if(Common.sessionMap.containsKey(Common.GAME_SIX_CODE)){
+            Session session = Common.sessionMap.get(Common.GAME_SIX_CODE);
+            if(!session.isOpen()){
+                Common.sessionMap.remove(Common.GAME_SIX_CODE);
+                session.close();
+            }else{
+                session.getBasicRemote().sendText("ping");
+            }
+        }
     }
 }