Skip to content

Commit

Permalink
Merge pull request #41117 from geoand/#41113
Browse files Browse the repository at this point in the history
Fix NPE when `QUARKUS_INIT_AND_EXIT` is used
  • Loading branch information
gsmet authored Jun 11, 2024
2 parents 5d49aba + 4fb6de1 commit 6dddd45
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public void setListeners(List<ShutdownListener> listeners, boolean delayEnabled)
}

public static void runShutdown() {
if (shutdownListeners == null) { // when QUARKUS_INIT_AND_EXIT is used, ShutdownRecorder#setListeners has not been called
return;
}
log.debug("Attempting to gracefully shutdown.");
try {
executePreShutdown();
Expand Down

0 comments on commit 6dddd45

Please sign in to comment.