Commit 3ddc5376 authored by michael-grunder's avatar michael-grunder Committed by antirez
Browse files

Return early in XPENDING if sent a nonexistent consumer group.

parent b85086c5
...@@ -1769,8 +1769,10 @@ void xpendingCommand(client *c) { ...@@ -1769,8 +1769,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)];
......
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