Skip to content

Commit e4b2ca9

Browse files
committed
Fix ReadOnly option in ClusterClient
1 parent 794e5c0 commit e4b2ca9

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)