Change PING output to match REDIS protocol

This commit is contained in:
Chris Rice 2023-07-06 19:14:28 -07:00
parent 564b64a758
commit 61b5023000
1 changed files with 3 additions and 1 deletions

View File

@ -215,7 +215,9 @@ func (s *Server) liveSubscription(
}
case RESP:
if len(msg.Args) > 1 {
data := redcon.AppendBulkString(nil, msg.Args[1])
data := redcon.AppendArray(nil, 2)
data = redcon.AppendBulkString(data, "PONG")
data = redcon.AppendBulkString(data, msg.Args[1])
write(data)
} else {
write([]byte("+PONG\r\n"))