Skip to content

Commit b0ac2ee

Browse files
authored
Merge pull request #1617 from go-redis/feature/cluster-read-only
Fix ReadOnly option in ClusterClient
2 parents 794e5c0 + e4b2ca9 commit b0ac2ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@ func (c *ClusterClient) cmdNode(
16391639
return nil, err
16401640
}
16411641

1642-
if (c.opt.RouteByLatency || c.opt.RouteRandomly) && cmdInfo != nil && cmdInfo.ReadOnly {
1642+
if c.opt.ReadOnly && cmdInfo != nil && cmdInfo.ReadOnly {
16431643
return c.slotReadOnlyNode(state, slot)
16441644
}
16451645
return state.slotMasterNode(slot)

0 commit comments

Comments
 (0)