Merge pull request #4977 from michael-grunder/xpending-early-return

Return early in XPENDING if sent a nonexistent consumer group.
This commit is contained in:
Salvatore Sanfilippo 2018-06-07 18:49:09 +02:00 committed by GitHub
commit 66c6218a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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