1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Remove releaseConnStrict

This commit is contained in:
Vladimir Mihailenco
2019-08-08 10:43:10 +03:00
parent 2927e15b6b
commit 48224a399f
4 changed files with 8 additions and 19 deletions

View File

@ -45,12 +45,13 @@ func isRedisError(err error) bool {
}
func isBadConn(err error, allowTimeout bool) bool {
switch err {
case nil:
if err == nil {
return false
}
if isRedisError(err) {
return isReadOnlyError(err) // #790
// Close connections in read only state in case domain addr is used
// and domain resolves to a different Redis Server. See #790.
return isReadOnlyError(err)
}
if allowTimeout {
if netErr, ok := err.(net.Error); ok && netErr.Timeout() {