diff --git a/client.go b/client.go index 162448a..241bc9f 100644 --- a/client.go +++ b/client.go @@ -901,6 +901,7 @@ func (c *HostClient) connsCleaner() { // Do not copy(c.conns, c.conns[1:]), since this may be // quite slow for multi-million conns count. // Just move c.conns one position ahead. + c.conns[0] = nil c.conns = c.conns[1:] } if c.connsCount == 0 { diff --git a/workerpool.go b/workerpool.go index 6119a62..aeaf929 100644 --- a/workerpool.go +++ b/workerpool.go @@ -87,6 +87,7 @@ func (wp *workerPool) clean() { // do not do copy(chans, chans[1:]), since this may be quite slow // for multi-million concurrent connections. Just move chans // pointer one position ahead. + chans[0] = nil chans = chans[1:] wp.workersCount-- }