mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Accept REPLCONF in any state.
This commit is contained in:
parent
a864cae2a5
commit
091ed386f7
@ -223,7 +223,7 @@ struct redisCommand redisCommandTable[] = {
|
|||||||
{"discard",discardCommand,1,"rs",0,NULL,0,0,0,0,0},
|
{"discard",discardCommand,1,"rs",0,NULL,0,0,0,0,0},
|
||||||
{"sync",syncCommand,1,"ars",0,NULL,0,0,0,0,0},
|
{"sync",syncCommand,1,"ars",0,NULL,0,0,0,0,0},
|
||||||
{"psync",syncCommand,3,"ars",0,NULL,0,0,0,0,0},
|
{"psync",syncCommand,3,"ars",0,NULL,0,0,0,0,0},
|
||||||
{"replconf",replconfCommand,-1,"ars",0,NULL,0,0,0,0,0},
|
{"replconf",replconfCommand,-1,"arslt",0,NULL,0,0,0,0,0},
|
||||||
{"flushdb",flushdbCommand,1,"w",0,NULL,0,0,0,0,0},
|
{"flushdb",flushdbCommand,1,"w",0,NULL,0,0,0,0,0},
|
||||||
{"flushall",flushallCommand,1,"w",0,NULL,0,0,0,0,0},
|
{"flushall",flushallCommand,1,"w",0,NULL,0,0,0,0,0},
|
||||||
{"sort",sortCommand,-2,"wm",0,NULL,1,1,1,0,0},
|
{"sort",sortCommand,-2,"wm",0,NULL,1,1,1,0,0},
|
||||||
@ -1842,9 +1842,10 @@ int processCommand(redisClient *c) {
|
|||||||
return REDIS_OK;
|
return REDIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lua script too slow? Only allow commands with REDIS_CMD_STALE flag. */
|
/* Lua script too slow? Only allow a limited number of commands. */
|
||||||
if (server.lua_timedout &&
|
if (server.lua_timedout &&
|
||||||
c->cmd->proc != authCommand &&
|
c->cmd->proc != authCommand &&
|
||||||
|
c->cmd->proc != replconfCommand &&
|
||||||
!(c->cmd->proc == shutdownCommand &&
|
!(c->cmd->proc == shutdownCommand &&
|
||||||
c->argc == 2 &&
|
c->argc == 2 &&
|
||||||
tolower(((char*)c->argv[1]->ptr)[0]) == 'n') &&
|
tolower(((char*)c->argv[1]->ptr)[0]) == 'n') &&
|
||||||
|
Loading…
Reference in New Issue
Block a user