mirror of https://github.com/apache/nifi.git
NIFI-145: Fixed stack trace that occassionally occurs on shutdown
This commit is contained in:
parent
97f8ab0cc5
commit
f63cd9a15e
|
@ -397,7 +397,11 @@ public class RunNiFi {
|
||||||
} catch (final InterruptedException ie) {
|
} catch (final InterruptedException ie) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
runtime.removeShutdownHook(shutdownHook);
|
try {
|
||||||
|
runtime.removeShutdownHook(shutdownHook);
|
||||||
|
} catch (final IllegalStateException ise) {
|
||||||
|
// happens when already shutting down
|
||||||
|
}
|
||||||
|
|
||||||
if (autoRestartNiFi) {
|
if (autoRestartNiFi) {
|
||||||
System.out.println("Apache NiFi appears to have died. Restarting...");
|
System.out.println("Apache NiFi appears to have died. Restarting...");
|
||||||
|
|
Loading…
Reference in New Issue