mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Retry timeout by default
This commit is contained in:
3
redis.go
3
redis.go
@ -268,13 +268,12 @@ func (c *baseClient) _process(ctx context.Context, cmd Cmder) error {
|
||||
}
|
||||
}
|
||||
|
||||
var retryTimeout bool
|
||||
retryTimeout := true
|
||||
lastErr = c.withConn(ctx, func(ctx context.Context, cn *pool.Conn) error {
|
||||
err := cn.WithWriter(ctx, c.opt.WriteTimeout, func(wr *proto.Writer) error {
|
||||
return writeCmd(wr, cmd)
|
||||
})
|
||||
if err != nil {
|
||||
retryTimeout = true
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user