commit 21/11/2025
This commit is contained in:
@@ -231,7 +231,8 @@ fun main() {
|
||||
db.Add_Log("AAS"," Application started")
|
||||
|
||||
// shutdown hook
|
||||
Runtime.getRuntime().addShutdownHook(Thread {
|
||||
Runtime.getRuntime().addShutdownHook(Thread ({
|
||||
|
||||
db.Add_Log("AAS"," Application stopping")
|
||||
Logger.info { "Shutdown hook called, stopping services..." }
|
||||
barixserver.StopTcpCommand()
|
||||
@@ -240,11 +241,12 @@ fun main() {
|
||||
web.Stop()
|
||||
udpreceiver.Stop()
|
||||
tcpreceiver.Stop()
|
||||
StreamerOutputs.values.forEach { it.close() }
|
||||
audioPlayer.Close()
|
||||
db.close()
|
||||
Logger.info { "All services stopped, exiting application." }
|
||||
ProviderRegistry.getLoggingProvider().shutdown()
|
||||
})
|
||||
},"ShutdownHook") )
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user