From 9742e8e43bfb29b83b5a8a88be7cc6610116d7c5 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 3 Feb 2017 12:54:55 +0300 Subject: cleanup --- juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'juick-ws/src/main/java/com/juick') diff --git a/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java b/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java index 2b69ea7d..8d0c3d76 100644 --- a/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java +++ b/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java @@ -125,12 +125,7 @@ public class WebsocketComponent extends TextWebSocketHandler implements Protocol public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception { synchronized (clients) { logger.info("session closed with status {}: {}", status.getCode(), status.getReason()); - clients.removeIf(c -> { - if (c.session.getId().equals(session.getId())) { - return true; - } - return false; - }); + clients.removeIf(c -> c.session.getId().equals(session.getId())); logger.info("{} clients connected", clients.size()); } -- cgit v1.2.3