Skip to content

Commit

Permalink
Update handler.go
Browse files Browse the repository at this point in the history
  • Loading branch information
diiyw authored Jul 10, 2024
1 parent b98dbab commit 7f779d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1552,9 +1552,11 @@ func hMGet(n *Nodis, conn *redis.Conn, cmd redis.Command) {
fields := cmd.Args[1:]
results := n.HMGet(key, fields...)
if results == nil {
conn.WriteArray(1)
conn.WriteBulkNull()
return
conn.WriteArray(len(fields))
for _, _ = range fields {
conn.WriteBulkNull()
}
return
}
conn.WriteArray(len(results))
for _, v := range results {
Expand Down

0 comments on commit 7f779d5

Please sign in to comment.