mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 09:30:55 +00:00
Allow PUBSUB NUMSUB without channels.
The result is an empty list but it is handy to call it programmatically.
This commit is contained in:
parent
455563faec
commit
519c9e11d1
@ -336,8 +336,8 @@ void pubsubCommand(redisClient *c) {
|
|||||||
}
|
}
|
||||||
dictReleaseIterator(di);
|
dictReleaseIterator(di);
|
||||||
setDeferredMultiBulkLength(c,replylen,mblen);
|
setDeferredMultiBulkLength(c,replylen,mblen);
|
||||||
} else if (!strcasecmp(c->argv[1]->ptr,"numsub") && c->argc > 2) {
|
} else if (!strcasecmp(c->argv[1]->ptr,"numsub") && c->argc >= 2) {
|
||||||
/* PUBSUB NUMSUB Channel_1 [... Channel_N] */
|
/* PUBSUB NUMSUB [Channel_1 ... Channel_N] */
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
addReplyMultiBulkLen(c,(c->argc-2)*2);
|
addReplyMultiBulkLen(c,(c->argc-2)*2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user