diff --git a/redis.go b/redis.go index 88cced7c..712579d4 100644 --- a/redis.go +++ b/redis.go @@ -316,6 +316,8 @@ func (c *baseClient) withConn( select { case <-done: _ = cn.Close() + // Wait for the goroutine to finish and send something. + <-errc err = ctx.Err() return err