1
0
mirror of https://github.com/redis/go-redis.git synced 2025-10-20 09:52:25 +03:00

better conn usable timeout

This commit is contained in:
Nedyalko Dyakov
2025-10-14 23:06:36 +03:00
parent 6c54ab59d9
commit 90bfdb3aa3
3 changed files with 34 additions and 11 deletions

View File

@@ -108,12 +108,12 @@ func isRedisError(err error) bool {
func isBadConn(err error, allowTimeout bool, addr string) bool {
switch err {
case nil:
return false
case context.Canceled, context.DeadlineExceeded:
return true
case nil:
return false
case context.Canceled, context.DeadlineExceeded:
return true
case pool.ErrConnUnusableTimeout:
return true
return true
}
if isRedisError(err) {