```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

refactor(socket): 移除重复保存锁并优化panic错误处理

移除了ServerEvent.go中的sync.Once保存锁,因为可能存在重复保存问题,
同时将panic错误处理从fmt.Println改为使用cool.Logger.Error进行统一日志记录

feat(player): 优化踢人功能并添加超时机制

移除kick.go中的复杂异步超时逻辑
This commit is contained in:
昔念
2026-02-02 23:11:14 +08:00
parent cdb7cec4ad
commit b25f033939
8 changed files with 36 additions and 79 deletions

View File

@@ -67,7 +67,7 @@ func (h Controller) UsePetItemOutOfFight(data *item.C2S_USE_PET_ITEM_OUT_OF_FIGH
result = &item.S2C_USE_PET_ITEM_OUT_OF_FIGHT{}
currentPet.CalculatePetPane(false)
copier.Copy(&result, currentPet)
defer c.Service.Info.Save(*c.Info)
return result, 0
}