This commit is contained in:
1
2026-01-22 16:01:52 +00:00
parent 3af709f633
commit 7d8497250d
9 changed files with 143 additions and 163 deletions

View File

@@ -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("资源清理完成,程序即将退出")
}