aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com')
-rw-r--r--juick-server/src/main/java/com/juick/server/ServerManager.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/juick-server/src/main/java/com/juick/server/ServerManager.java b/juick-server/src/main/java/com/juick/server/ServerManager.java
index 4f25929b..fce92705 100644
--- a/juick-server/src/main/java/com/juick/server/ServerManager.java
+++ b/juick-server/src/main/java/com/juick/server/ServerManager.java
@@ -244,16 +244,14 @@ public class ServerManager implements NotificationListener {
public void sendSseEvent(Message msg, List<User> subscribers) {
List<EventSession> deadEmitters = new ArrayList<>();
- synchronized (this.getSessions()) {
- this.sessions.stream().filter(s -> subscribers.contains(s.user)).forEach(session -> {
- try {
- session.getEmitter().send(msg);
- } catch (Exception e) {
- deadEmitters.add(session);
- }
- });
- this.sessions.removeAll(deadEmitters);
- }
+ this.sessions.stream().filter(s -> subscribers.contains(s.user)).forEach(session -> {
+ try {
+ session.getEmitter().send(msg);
+ } catch (Exception e) {
+ deadEmitters.add(session);
+ }
+ });
+ this.sessions.removeAll(deadEmitters);
}
public static class EventSession {