1
This commit is contained in:
@@ -39,13 +39,14 @@ func PprofWeb() {
|
||||
// cleanup 优雅清理资源,根据业务需求实现
|
||||
func cleanup() {
|
||||
log.Println("执行优雅清理资源...")
|
||||
fight.Fightpool.ReleaseTimeout(0)
|
||||
|
||||
|
||||
player.Mainplayer.Range(func(key uint32, value *player.Player) bool {
|
||||
value.Save()
|
||||
value.Kick()
|
||||
|
||||
return true
|
||||
})
|
||||
fight.Fightpool.ReleaseTimeout(0)
|
||||
log.Println("资源清理完成,程序即将退出")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user