commit 21/11/2025

This commit is contained in:
2025-11-21 13:33:37 +07:00
parent 46be98363a
commit 421ed661ad
7 changed files with 165 additions and 133 deletions

View File

@@ -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") )
}