This commit is contained in:
Tnze
2022-12-06 22:39:45 +08:00
12 changed files with 249 additions and 85 deletions

View File

@ -118,7 +118,6 @@ func (k *KeepAlive) tickPlayer(c KeepAliveClient) {
elem, ok := k.listIndex[c]
if !ok {
panic(errors.New("keepalive: fail to tick player: client not found"))
return
}
if elem.Prev() == nil {
if !k.waitTimer.Stop() {
@ -156,7 +155,6 @@ func keepAliveSetTimer(l *list.List, timer *time.Timer, interval time.Duration)
}
}
timer.Reset(interval)
return
}
type keepAliveItem struct {