From 0af02a8047f88216e7d43c63c9e8ce27107b40f9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 27 Apr 2017 11:17:59 +0300 Subject: juick-ws: treat visitors with wrong hash as anonymous --- juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'juick-ws') 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 bca1b27a..bca5c804 100644 --- a/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java +++ b/juick-ws/src/main/java/com/juick/ws/WebsocketComponent.java @@ -72,12 +72,7 @@ public class WebsocketComponent extends TextWebSocketHandler implements Protocol if (hash.length() == 16) { visitor = userService.getUserByHash(hash); } else { - try { - logger.info("wrong hash for {} from {}", visitor.getUid(), hXRealIP); - session.close(new CloseStatus(403, "Forbidden")); - } catch (IOException e) { - logger.warn("ws error", e); - } + logger.info("wrong hash for {} from {}", visitor.getUid(), hXRealIP); } break; } -- cgit v1.2.3