mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 15:10:23 +00:00
Check for startup when receiving shutdown notice
This commit is contained in:
parent
26762d4d80
commit
b8a981eb1f
2 changed files with 7 additions and 0 deletions
|
@ -255,6 +255,12 @@ public abstract class OperationMode {
|
|||
}
|
||||
|
||||
public static void shutdown(boolean inShutdownHook, boolean hasError) {
|
||||
// We can receive shutdown events while we are still starting up
|
||||
// In that case ignore them until we are finished
|
||||
if (isInStartup()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// In case we are stuck while in shutdown, instantly exit this application
|
||||
if (inShutdown && inShutdownHook) {
|
||||
TrackEvent.info("Received another shutdown request while in shutdown hook. Halting ...");
|
||||
|
|
|
@ -157,6 +157,7 @@ public class SentryErrorHandler implements ErrorHandler {
|
|||
"logs",
|
||||
Boolean.toString(
|
||||
ee.isShouldSendDiagnostics() && !ee.getAttachments().isEmpty()));
|
||||
s.setTag("inStartup", Boolean.toString(OperationMode.isInStartup()));
|
||||
s.setTag("inShutdown", Boolean.toString(OperationMode.isInShutdown()));
|
||||
s.setTag("unhandled", Boolean.toString(ee.isUnhandled()));
|
||||
|
||||
|
|
Loading…
Reference in a new issue