mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 01:31:21 +00:00
Merge pull request #7030 from valentinogeron/xread-in-lua
XREAD and XREADGROUP should not be allowed from scripts when BLOCK op…
This commit is contained in:
@ -1374,6 +1374,11 @@ void xreadCommand(client *c) {
|
||||
int moreargs = c->argc-i-1;
|
||||
char *o = c->argv[i]->ptr;
|
||||
if (!strcasecmp(o,"BLOCK") && moreargs) {
|
||||
if (c->flags & CLIENT_LUA) {
|
||||
/* There is no sense to use BLOCK option within LUA */
|
||||
addReplyErrorFormat(c, "%s command is not allowed with BLOCK option from scripts", (char *)c->argv[0]->ptr);
|
||||
return;
|
||||
}
|
||||
i++;
|
||||
if (getTimeoutFromObjectOrReply(c,c->argv[i],&timeout,
|
||||
UNIT_MILLISECONDS) != C_OK) return;
|
||||
|
Reference in New Issue
Block a user