Skip to content

Commit

Permalink
Fixed PING echo command
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinmwinuka committed Feb 11, 2024
1 parent 4a2b9a3 commit cb9de7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/ping/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func handlePing(ctx context.Context, cmd []string, server utils.Server, conn *ne
case 1:
return []byte("+PONG\r\n\r\n"), nil
case 2:
return []byte(fmt.Sprintf("%s\r\n%d\r\n%s\r\n\r\n", "$", len(cmd[1]), cmd[1])), nil
return []byte(fmt.Sprintf("$%d\r\n%s\r\n\r\n", len(cmd[1]), cmd[1])), nil
}
}

Expand Down

0 comments on commit cb9de7a

Please sign in to comment.