aboutsummaryrefslogtreecommitdiff
path: root/juick-ws/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-ws/src/main/java/com/juick')
-rw-r--r--juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java7
1 files changed, 1 insertions, 6 deletions
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());
}