From 03a30ab3d3922c9a7306b775e2b27ddf233d287b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 07 Dec 2021 14:10:45 +0800
Subject: [PATCH] 20211207 fish
---
src/main/java/com/xcong/excoin/websocket/handler/FishHitWebSocketHandler.java | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/websocket/handler/FishHitWebSocketHandler.java b/src/main/java/com/xcong/excoin/websocket/handler/FishHitWebSocketHandler.java
index 87165a6..2d242e5 100644
--- a/src/main/java/com/xcong/excoin/websocket/handler/FishHitWebSocketHandler.java
+++ b/src/main/java/com/xcong/excoin/websocket/handler/FishHitWebSocketHandler.java
@@ -110,9 +110,12 @@
@Override
public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) throws Exception {
+ log.info("离开websocket");
Long memberId = SID_MID.get(session.getId());
+ if (memberId != null) {
+ MEMBER_SESSIONS.remove(memberId);
+ }
SID_MID.remove(session.getId());
- MEMBER_SESSIONS.remove(memberId);
}
}
--
Gitblit v1.9.1