no need to log if we're not sending any notification

This commit is contained in:
Athou
2023-04-30 21:47:29 +02:00
parent 9a2dda626c
commit 4a40f2b8f7

View File

@@ -34,6 +34,7 @@ public class WebSocketSessions {
.flatMap(e -> e.getValue().stream()) .flatMap(e -> e.getValue().stream())
.collect(Collectors.toSet()); .collect(Collectors.toSet());
if (!userSessions.isEmpty()) {
log.debug("sending '{}' to {} users via websocket", text, userSessions.size()); log.debug("sending '{}' to {} users via websocket", text, userSessions.size());
for (Session userSession : userSessions) { for (Session userSession : userSessions) {
if (userSession.isOpen()) { if (userSession.isOpen()) {
@@ -41,4 +42,5 @@ public class WebSocketSessions {
} }
} }
} }
}
} }