Commit a4f8f4a8 authored by antirez's avatar antirez
Browse files

RESP3: PING should reply normally in RESP3 Pub/Sub mode.

Because in RESP3 commands can be sent in the Pub/Sub connection without
problems, so it's better if in such mode there is no exception about
PING.
parent eaaac088
......@@ -2924,7 +2924,7 @@ void pingCommand(client *c) {
return;
}
if (c->flags & CLIENT_PUBSUB) {
if (c->flags & CLIENT_PUBSUB && c->resp == 2) {
addReply(c,shared.mbulkhdr[2]);
addReplyBulkCBuffer(c,"pong",4);
if (c->argc == 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment