diff options
author | antirez <antirez@gmail.com> | 2018-12-19 17:55:07 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-01-09 17:00:30 +0100 |
commit | a4f8f4a8246965c28a2ed3906a0567fbbfe09440 (patch) | |
tree | d04c5f6b8b3b4572e181fee5222eb2b78cdd2d63 | |
parent | eaaac0889223406bef4e7ee34d75616ac6599b36 (diff) | |
download | redis-a4f8f4a8246965c28a2ed3906a0567fbbfe09440.tar.gz |
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.
-rw-r--r-- | src/server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server.c b/src/server.c index 8cdbdad76..c5b667886 100644 --- a/src/server.c +++ b/src/server.c @@ -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) |