Skip to content

Commit

Permalink
Prevent IllegalStateException when closing SSE sink
Browse files Browse the repository at this point in the history
Fixes openhab#1499

Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn committed Oct 7, 2020
1 parent 44b1823 commit cbe7c52
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ public void closeAndRemoveIf(Predicate<I> predicate) {
}

private void close(final SseEventSink sink) {
if (sink.isClosed()) {
logger.debug("SSE event sink is already closed");
return;
}

try {
sink.close();
} catch (final RuntimeException ex) {
Expand Down

0 comments on commit cbe7c52

Please sign in to comment.