Skip to content

Commit

Permalink
Fix NPE when QUARKUS_INIT_AND_EXIT is used
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jun 11, 2024
1 parent 99d63a7 commit 4fb6de1
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 4fb6de1

Please sign in to comment.