优化
This commit is contained in:
parent
a7305f66dc
commit
bca1e62368
@ -41,7 +41,17 @@ func Run(mods ...module.Module) {
|
||||
|
||||
// console
|
||||
console.Init()
|
||||
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
log.Debug("Leaf console error: %v", r)
|
||||
log.Debug("Leaf closing down\n")
|
||||
console.Destroy()
|
||||
cluster.Destroy()
|
||||
module.Destroy()
|
||||
game.Destroy()
|
||||
os.Exit(1)
|
||||
}
|
||||
}()
|
||||
// close
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, syscall.SIGTERM, syscall.SIGINT)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user