From a15a89ea5876f83e3a8c77f442a26467fdd8fa47 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Sat, 4 Jun 2022 14:52:46 +0300 Subject: [PATCH] chore: fix build --- internal/pool/pool.go | 4 ++-- main_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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) {