aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-06-30 12:33:46 +0300
committerGravatar Vitaly Takmazov2016-06-30 12:33:46 +0300
commit4bc9b403ff3cac9ee115a788b18cffff520a9e3b (patch)
tree6bacb059312f54b5399e2a0cc2445f834a877f78 /src
parente0d4d97777962c6f1752d7772b57392ec53dfc21 (diff)
fix session close
Diffstat (limited to 'src')
-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;
}