mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
no need to log if we're not sending any notification
This commit is contained in:
@@ -34,10 +34,12 @@ public class WebSocketSessions {
|
|||||||
.flatMap(e -> e.getValue().stream())
|
.flatMap(e -> e.getValue().stream())
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
log.debug("sending '{}' to {} users via websocket", text, userSessions.size());
|
if (!userSessions.isEmpty()) {
|
||||||
for (Session userSession : userSessions) {
|
log.debug("sending '{}' to {} users via websocket", text, userSessions.size());
|
||||||
if (userSession.isOpen()) {
|
for (Session userSession : userSessions) {
|
||||||
userSession.getAsyncRemote().sendText(text);
|
if (userSession.isOpen()) {
|
||||||
|
userSession.getAsyncRemote().sendText(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user