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:
7
error.go
7
error.go
@ -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() {
|
||||
|
Reference in New Issue
Block a user