Fixed sigint close command issues

This commit is contained in:
Robinson 2023-10-24 13:46:16 +02:00
parent 90d087054e
commit 044ce8771f
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
1 changed files with 8 additions and 2 deletions

View File

@ -387,9 +387,15 @@ class AeronRmiClientServer {
throwable.printStackTrace()
}
var closeCalled = false
SigInt.register {
server.logger.info("Shutting down via sig-int command")
server.close()
// only close once
if (!closeCalled) {
closeCalled = true
server.logger.info("Shutting down via sig-int command")
server.close()
}
}