Return early in XPENDING if sent a nonexistent consumer group.

This commit is contained in:
michael-grunder 2018-06-02 18:22:20 -07:00
parent 86de089a1e
commit 1749fe7a26

View File

@ -1728,8 +1728,10 @@ void xpendingCommand(client *c) {
/* If a consumer name was mentioned but it does not exist, we can /* If a consumer name was mentioned but it does not exist, we can
* just return an empty array. */ * just return an empty array. */
if (consumername && consumer == NULL) if (consumername && consumer == NULL) {
addReplyMultiBulkLen(c,0); addReplyMultiBulkLen(c,0);
return;
}
rax *pel = consumer ? consumer->pel : group->pel; rax *pel = consumer ? consumer->pel : group->pel;
unsigned char startkey[sizeof(streamID)]; unsigned char startkey[sizeof(streamID)];