Commit 519c9e11 authored by antirez's avatar antirez
Browse files

Allow PUBSUB NUMSUB without channels.

The result is an empty list but it is handy to call it programmatically.
parent 455563fa
......@@ -336,8 +336,8 @@ void pubsubCommand(redisClient *c) {
}
dictReleaseIterator(di);
setDeferredMultiBulkLength(c,replylen,mblen);
} else if (!strcasecmp(c->argv[1]->ptr,"numsub") && c->argc > 2) {
/* PUBSUB NUMSUB Channel_1 [... Channel_N] */
} else if (!strcasecmp(c->argv[1]->ptr,"numsub") && c->argc >= 2) {
/* PUBSUB NUMSUB [Channel_1 ... Channel_N] */
int j;
addReplyMultiBulkLen(c,(c->argc-2)*2);
......
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