mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Attempt to cleanup cluster logic.
This commit is contained in:
9
error.go
9
error.go
@ -2,6 +2,8 @@ package redis
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
)
|
||||
|
||||
// Redis nil reply.
|
||||
@ -21,3 +23,10 @@ func errorf(s string, args ...interface{}) redisError {
|
||||
func (err redisError) Error() string {
|
||||
return err.s
|
||||
}
|
||||
|
||||
func isNetworkError(err error) bool {
|
||||
if _, ok := err.(*net.OpError); ok || err == io.EOF {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user