1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-14 01:21:30 +03:00

Conn timeout should be higher than read timeout

This commit is contained in:
Vladimir Mihailenco
2018-07-22 08:49:48 +03:00
parent ee41b90923
commit b92dacbfa7
4 changed files with 8 additions and 9 deletions

View File

@ -176,9 +176,8 @@ func (c *baseClient) retryBackoff(attempt int) time.Duration {
func (c *baseClient) cmdTimeout(cmd Cmder) time.Duration {
if timeout := cmd.readTimeout(); timeout != nil {
return *timeout
return readTimeout(*timeout)
}
return c.opt.ReadTimeout
}