提交 a4f8f4a8 编写于 作者: A antirez

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.
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册