Commit 8d8755c7 authored by antirez's avatar antirez
Browse files

CG: throw an error if XREADGROUP is used without GROUP.

parent d4f81ebd
...@@ -1131,6 +1131,13 @@ void xreadCommand(client *c) { ...@@ -1131,6 +1131,13 @@ void xreadCommand(client *c) {
return; return;
} }
/* If the user specified XREADGROUP then it must also
* provide the GROUP option. */
if (xreadgroup && groupname == NULL) {
addReplyError(c,"Missing GROUP option for XREADGROUP");
return;
}
/* Parse the IDs and resolve the group name. */ /* Parse the IDs and resolve the group name. */
if (streams_count > STREAMID_STATIC_VECTOR_LEN) if (streams_count > STREAMID_STATIC_VECTOR_LEN)
ids = zmalloc(sizeof(streamID)*streams_count); ids = zmalloc(sizeof(streamID)*streams_count);
......
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