Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreKoepke committed Feb 20, 2025
1 parent 038a634 commit c2ef8a6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public void broadcast(Object message) {

@SneakyThrows
public void sendMessage(Session session, Object message) {
if (sendHashCodes.getOrDefault(session, new HashSet<>()).contains(message.hashCode())) {
sendHashCodes.putIfAbsent(session, new HashSet<>());
if (sendHashCodes.get(session).contains(message.hashCode())) {
return;
}
sendHashCodes.getOrDefault(session, new HashSet<>()).add(message.hashCode());
Expand Down

0 comments on commit c2ef8a6

Please sign in to comment.