mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-20 02:24:45 +00:00
Add shutdown hook for cleanup
This commit is contained in:
parent
d880a95aee
commit
aeaaba50f5
|
|
@ -165,6 +165,12 @@ object PsLogin {
|
|||
|
||||
logger.info(s"NOTE: Set client.ini to point to ${LoginConfig.serverIpAddress.getHostAddress}:$loginServerPort")
|
||||
|
||||
// Add our shutdown hook (this works for Control+C as well, but not in Cygwin)
|
||||
sys addShutdownHook {
|
||||
// TODO: clean up active sessions and close resources safely
|
||||
logger.info("Login server now shutting down...")
|
||||
}
|
||||
|
||||
// Wait forever until the actor system shuts down
|
||||
Await.result(system.whenTerminated, Duration.Inf)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue