Browse Source

超能心跳

kk 2 months ago
parent
commit
1fb17ebe01

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

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