add shutdown hook to shutdown core on SIGTERM

This commit is contained in:
Zlatin Balevsky
2019-06-20 13:29:15 +01:00
parent 4e2a530a13
commit 948b6292fe
2 changed files with 10 additions and 0 deletions

View File

@@ -98,6 +98,9 @@ class Ready extends AbstractLifecycleHandler {
"Can't connect to I2P router", JOptionPane.WARNING_MESSAGE)
System.exit(0)
}
Runtime.getRuntime().addShutdownHook({
core.shutdown()
})
core.startServices()
application.context.put("muwire-settings", props)
application.context.put("core",core)