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

Set read/write timeouts more consistently.

This commit is contained in:
Vladimir Mihailenco
2016-12-03 17:30:13 +02:00
parent e7f23a300b
commit b4efc45f1c
18 changed files with 343 additions and 198 deletions

View File

@ -267,10 +267,10 @@ func (d *sentinelFailover) closeOldConns(newMaster string) {
if cn == nil {
break
}
if cn.RemoteAddr().String() != newMaster {
if cn.NetConn.RemoteAddr().String() != newMaster {
err := fmt.Errorf(
"sentinel: closing connection to the old master %s",
cn.RemoteAddr(),
cn.NetConn.RemoteAddr(),
)
internal.Logf(err.Error())
d.pool.Remove(cn, err)