Don't block on shutdown kill

This commit is contained in:
crschnick 2023-11-30 17:29:51 +00:00
parent ba843e8b13
commit a4ba5d9726
2 changed files with 6 additions and 1 deletions

View file

@ -230,6 +230,12 @@ public abstract class OperationMode {
}
public static void shutdown(boolean inShutdownHook, boolean hasError) {
// In case we are stuck while in shutdown, allow for an external kill command to instantly exit this application
if (inShutdown && inShutdownHook) {
TrackEvent.info("Received SIGTERM while in shutdown. Halting ...");
OperationMode.halt(1);
}
if (inShutdown) {
return;
}

View file

@ -8,7 +8,6 @@ import io.xpipe.app.issue.LogErrorHandler;
import io.xpipe.app.issue.TrackEvent;
import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.util.ThreadHelper;
import io.xpipe.beacon.BeaconException;
import io.xpipe.beacon.BeaconServer;
import io.xpipe.beacon.exchange.FocusExchange;
import io.xpipe.beacon.exchange.OpenExchange;