Skip to content

Commit

Permalink
fix: bug
Browse files Browse the repository at this point in the history
  • Loading branch information
david-parkk committed Oct 26, 2024
1 parent 538e384 commit f849800
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ public Mono<Void> handle(WebSocketSession session) {
});
})
.flatMap(data->{
return Flux.fromIterable(sessions.values())
.flatMap(wsSession -> {
return Flux.fromIterable(sessions.entrySet())
.flatMap(entry -> {
WebSocketSession wsSession = entry.getValue();
String key = entry.getKey();
if(!wsSession.isOpen()) {
wsSession.close().subscribe();
sessions.remove(key);
return Mono.never();
}
else
Expand Down

0 comments on commit f849800

Please sign in to comment.