Skip to content

Commit

Permalink
Avoid redundant Stop event.
Browse files Browse the repository at this point in the history
  • Loading branch information
mnlipp committed Jan 9, 2024
1 parent 245fad3 commit f6b7068
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.LogManager;
import java.util.logging.Logger;
Expand Down Expand Up @@ -595,7 +596,7 @@ public void onExit(Exit event) {
}

private void shutdown() {
if (state != State.TERMINATING) {
if (!Set.of(State.TERMINATING, State.STOPPED).contains(state)) {
fire(new Stop());
}
try {
Expand Down

0 comments on commit f6b7068

Please sign in to comment.