make shutdown hook work correctly

This commit is contained in:
Wieland Schöbl
2020-08-14 02:19:15 +02:00
parent a8babb52ba
commit d15fb92acf
3 changed files with 19 additions and 17 deletions

View File

@@ -25,7 +25,9 @@ fun main() {
Runtime.getRuntime().addShutdownHook(object : Thread() {
override fun run() {
println("Shutting down...")
Admin.printlnBlocking("Shutting down")
println("Sending shutdown notice to Admin, waiting 5s...")
Admin.println("Shutting down")
sleep(5000)
}
})