|
|
@ -493,9 +493,23 @@ public class PantheonCommand implements Runnable { |
|
|
|
webSocketConfiguration, |
|
|
|
webSocketConfiguration, |
|
|
|
dataDir); |
|
|
|
dataDir); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addShutdownHook(runner); |
|
|
|
runner.execute(); |
|
|
|
runner.execute(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void addShutdownHook(final Runner runner) { |
|
|
|
|
|
|
|
Runtime.getRuntime() |
|
|
|
|
|
|
|
.addShutdownHook( |
|
|
|
|
|
|
|
new Thread( |
|
|
|
|
|
|
|
() -> { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
runner.close(); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
})); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Used to discover the default IP of the client.
|
|
|
|
// Used to discover the default IP of the client.
|
|
|
|
// Loopback IP is used by default as this is how smokeTests require it to be
|
|
|
|
// Loopback IP is used by default as this is how smokeTests require it to be
|
|
|
|
// and it's probably a good security behaviour to default only on the localhost.
|
|
|
|
// and it's probably a good security behaviour to default only on the localhost.
|
|
|
|