aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/ws/WebsocketComponent.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/ws/WebsocketComponent.java')
-rw-r--r--src/main/java/com/juick/ws/WebsocketComponent.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/juick/ws/WebsocketComponent.java b/src/main/java/com/juick/ws/WebsocketComponent.java
index daf17753..5dfe8237 100644
--- a/src/main/java/com/juick/ws/WebsocketComponent.java
+++ b/src/main/java/com/juick/ws/WebsocketComponent.java
@@ -107,7 +107,7 @@ public class WebsocketComponent extends TextWebSocketHandler {
public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {
synchronized (clients) {
clients.removeIf(c -> {
- if (c.session.equals(session)) {
+ if (c.session.getId().equals(session.getId())) {
logger.info(String.format("session from %s closed with status %d", c.clientName, status.getCode()));
return true;
}