Skip to content

Commit

Permalink
Ensure Closeable EventHandlers removed from handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryShea committed Jul 17, 2019
1 parent c0588dd commit ac2ae30
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,9 @@ public VanillaEventLoop(EventLoop parent,

public static void closeAll(@NotNull List<EventHandler> handlers) {
handlers.forEach(h -> {
if (h instanceof Closeable) {
if (h instanceof Closeable)
Closeable.closeQuietly(h);
} else {
handlers.remove(h);
}
handlers.remove(h);
});
}

Expand Down

0 comments on commit ac2ae30

Please sign in to comment.