1
0
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:
Vladimir Mihailenco
2015-04-04 16:46:57 +03:00
parent 8096f43489
commit 94a31f499f
4 changed files with 145 additions and 229 deletions

View File

@ -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
}