mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Pick random node when command does not have keys
This commit is contained in:
@ -82,13 +82,13 @@ func cmdFirstKeyPos(cmd Cmder, info *CommandInfo) int {
|
||||
if cmd.stringArg(2) != "0" {
|
||||
return 3
|
||||
} else {
|
||||
return -1
|
||||
return 0
|
||||
}
|
||||
case "publish":
|
||||
return 1
|
||||
}
|
||||
if info == nil {
|
||||
return -1
|
||||
return 0
|
||||
}
|
||||
return int(info.FirstKeyPos)
|
||||
}
|
||||
|
Reference in New Issue
Block a user