This commit is contained in:
@@ -101,7 +101,7 @@ func (h Controller) FreshLeaveFightLevel(data *fight.FRESH_LEAVE_FIGHT_LEVEL, c
|
||||
out := info.NewOutInfo()
|
||||
copier.CopyWithOption(out, c.GetInfo(), copier.Option{DeepCopy: true})
|
||||
|
||||
c.SendPackCmd(2001, out)
|
||||
//c.SendPackCmd(2001, out)
|
||||
return result, 0
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ func (h Controller) AcceptTask(data *task.AcceptTaskInboundInfo, c *player.Playe
|
||||
}
|
||||
taskinfo := service.NewTaskService().IsAcceptable(data.TaskId)
|
||||
if taskinfo == nil {
|
||||
return nil, errorcode.ErrorCodes.ErrSystemError
|
||||
return nil, errorcode.ErrorCodes.ErrCannotAcceptDailyTasks
|
||||
}
|
||||
if taskinfo.ParentTaskId != 0 && c.Info.GetTask(int(taskinfo.ParentTaskId)) != model.Completed {
|
||||
return nil, errorcode.ErrorCodes.ErrInsufficientTasksForReward
|
||||
|
||||
@@ -253,7 +253,7 @@ func (player1 *Player) Kick(isquit bool) {
|
||||
|
||||
// --- 新增超时机制核心代码 ---
|
||||
// 设定超时时间(可根据业务需求调整,这里以3秒为例)
|
||||
const kickTimeout = 5 * time.Second
|
||||
const kickTimeout = 3 * time.Second
|
||||
select {
|
||||
case <-CloseChan:
|
||||
// 正常流程:连接关闭回调已执行,CloseChan 被关闭
|
||||
|
||||
Reference in New Issue
Block a user