mirror of
https://github.com/apache/nifi.git
synced 2025-02-17 15:36:36 +00:00
NIFI-884 Moving deletion of pid file from beginning of stop() to after a successful stop
This commit is contained in:
parent
1f6805f06d
commit
0931c6b0d6
@ -499,11 +499,6 @@ public class RunNiFi {
|
||||
final Properties nifiProps = loadProperties(logger);
|
||||
final String secretKey = nifiProps.getProperty("secret.key");
|
||||
|
||||
final File statusFile = getStatusFile(logger);
|
||||
if (statusFile.exists() && !statusFile.delete()) {
|
||||
logger.error("Failed to delete status file {}; this file should be cleaned up manually", statusFile);
|
||||
}
|
||||
|
||||
try (final Socket socket = new Socket()) {
|
||||
logger.debug("Connecting to NiFi instance");
|
||||
socket.setSoTimeout(60000);
|
||||
@ -568,6 +563,10 @@ public class RunNiFi {
|
||||
}
|
||||
}
|
||||
|
||||
final File statusFile = getStatusFile(logger);
|
||||
if (statusFile.exists() && !statusFile.delete()) {
|
||||
logger.error("Failed to delete status file {}; this file should be cleaned up manually", statusFile);
|
||||
}
|
||||
logger.info("NiFi has finished shutting down.");
|
||||
}
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user