diff --git a/internal/pool/pool.go b/internal/pool/pool.go index 44a4e77..3a6ecb2 100644 --- a/internal/pool/pool.go +++ b/internal/pool/pool.go @@ -542,7 +542,7 @@ func (p *ConnPool) reapStaleConn() *Conn { func (p *ConnPool) isStaleConn(cn *Conn) bool { if p.opt.IdleTimeout == 0 && p.opt.MaxConnAge == 0 { - return false + return connCheck(cn.netConn) != nil } now := time.Now() @@ -553,5 +553,5 @@ func (p *ConnPool) isStaleConn(cn *Conn) bool { return true } - return false + return connCheck(cn.netConn) != nil } diff --git a/main_test.go b/main_test.go index 5414310..5529112 100644 --- a/main_test.go +++ b/main_test.go @@ -324,7 +324,7 @@ func startRedis(port string, args ...string) (*redisProcess, error) { p := &redisProcess{process, client} registerProcess(port, p) - return p, err + return p, nil } func startSentinel(port, masterName, masterPort string) (*redisProcess, error) {