From 4bc9b403ff3cac9ee115a788b18cffff520a9e3b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 30 Jun 2016 12:33:46 +0300 Subject: fix session close --- src/main/java/com/juick/ws/WebsocketComponent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3