From a08a0ea52bb5cf76f207dcdcb3084e18cdfad6d3 Mon Sep 17 00:00:00 2001 From: gsd Date: Sat, 3 Feb 2024 21:58:02 +0300 Subject: [PATCH] external services fix 1 --- src/main/java/app/services/ExternalServices.java | 1 + .../java/app/websocket/handlers/ExternalServicesHandler.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/app/services/ExternalServices.java b/src/main/java/app/services/ExternalServices.java index 26757f9..5727b56 100644 --- a/src/main/java/app/services/ExternalServices.java +++ b/src/main/java/app/services/ExternalServices.java @@ -48,6 +48,7 @@ public class ExternalServices { } public void update(String name) { + if (name == null || name.isEmpty()) return; services.put(name, Instant.now().getEpochSecond()); } } diff --git a/src/main/java/app/websocket/handlers/ExternalServicesHandler.java b/src/main/java/app/websocket/handlers/ExternalServicesHandler.java index 6be2069..1118d72 100644 --- a/src/main/java/app/websocket/handlers/ExternalServicesHandler.java +++ b/src/main/java/app/websocket/handlers/ExternalServicesHandler.java @@ -37,7 +37,6 @@ public class ExternalServicesHandler extends TextWebSocketHandler implements Bas @Override @CheckWebAccess(auth_method = AuthMethod.SECRET_KEY) public void afterConnectionEstablished(WebSocketSession session) throws Exception { - logger.info("Session {} open", session.getId()); super.afterConnectionEstablished(session); if (session.isOpen()) { logger.info("Session {} open", session.getId());