mirror of https://github.com/go-redis/redis.git
Inc StaleConns in ReapStaleConns
This commit is contained in:
parent
fa2f6ee00b
commit
717362d3e9
|
@ -428,12 +428,11 @@ func (p *ConnPool) reaper(frequency time.Duration) {
|
||||||
if p.closed() {
|
if p.closed() {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
n, err := p.ReapStaleConns()
|
_, err := p.ReapStaleConns()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
internal.Logger.Printf("ReapStaleConns failed: %s", err)
|
internal.Logger.Printf("ReapStaleConns failed: %s", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
atomic.AddUint32(&p.stats.StaleConns, uint32(n))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -454,6 +453,7 @@ func (p *ConnPool) ReapStaleConns() (int, error) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
atomic.AddUint32(&p.stats.StaleConns, uint32(n))
|
||||||
return n, nil
|
return n, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue