|
@@ -75,8 +75,7 @@ type clientMapInner struct {
|
|
|
// than timeout in the past.
|
|
// than timeout in the past.
|
|
|
func (inner *clientMapInner) removeExpired(now time.Time, timeout time.Duration) {
|
|
func (inner *clientMapInner) removeExpired(now time.Time, timeout time.Duration) {
|
|
|
for len(inner.byAge) > 0 && now.Sub(inner.byAge[0].LastSeen) >= timeout {
|
|
for len(inner.byAge) > 0 && now.Sub(inner.byAge[0].LastSeen) >= timeout {
|
|
|
- record := heap.Pop(inner).(*clientRecord)
|
|
|
|
|
- close(record.SendQueue)
|
|
|
|
|
|
|
+ heap.Pop(inner)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|