Skip to content

Commit

Permalink
Merge pull request redis#340 from go-redis/fix/setbit
Browse files Browse the repository at this point in the history
Fix Del command case.
  • Loading branch information
vmihailenco authored Jul 8, 2016
2 parents 65a64fe + 261cf7a commit eca5d02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ func (c *ClusterClient) slotClosestNode(slot int) (*clusterNode, error) {
func (c *ClusterClient) cmdSlotAndNode(cmd Cmder) (int, *clusterNode, error) {
cmdInfo := c.cmdInfo(cmd.arg(0))
if cmdInfo == nil {
internal.Logf("info for cmd=%s not found", cmd.arg(0))
node, err := c.randomNode()
return 0, node, err
}
Expand Down
2 changes: 1 addition & 1 deletion commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ func (c *cmdable) Set(key string, value interface{}, expiration time.Duration) *

func (c *cmdable) SetBit(key string, offset int64, value int) *IntCmd {
cmd := NewIntCmd(
"SETBIT",
"setbit",
key,
offset,
value,
Expand Down
1 change: 1 addition & 0 deletions ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func (c *Ring) cmdInfo(name string) *CommandInfo {
func (c *Ring) cmdFirstKey(cmd Cmder) string {
cmdInfo := c.cmdInfo(cmd.arg(0))
if cmdInfo == nil {
internal.Logf("info for cmd=%s not found", cmd.arg(0))
return ""
}
return cmd.arg(int(cmdInfo.FirstKeyPos))
Expand Down

0 comments on commit eca5d02

Please sign in to comment.