mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Fix ReadOnly option in ClusterClient
This commit is contained in:
@ -1639,7 +1639,7 @@ func (c *ClusterClient) cmdNode(
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.opt.RouteByLatency || c.opt.RouteRandomly) && cmdInfo != nil && cmdInfo.ReadOnly {
|
if c.opt.ReadOnly && cmdInfo != nil && cmdInfo.ReadOnly {
|
||||||
return c.slotReadOnlyNode(state, slot)
|
return c.slotReadOnlyNode(state, slot)
|
||||||
}
|
}
|
||||||
return state.slotMasterNode(slot)
|
return state.slotMasterNode(slot)
|
||||||
|
Reference in New Issue
Block a user