added exception to allow pings during loading

Former-commit-id: 8a557e9d711c3aadbc566cf96ca2a18f10e8d5a4
This commit is contained in:
christianEQ 2021-01-14 21:59:34 +00:00 committed by John Sully
parent 19dc63bd3a
commit a0ae32a9f0

View File

@ -3853,8 +3853,8 @@ int processCommand(client *c, int callFlags) {
(c->cmd->proc == execCommand && (c->mstate.cmd_flags & CMD_DENYOOM)); (c->cmd->proc == execCommand && (c->mstate.cmd_flags & CMD_DENYOOM));
int is_denystale_command = !(c->cmd->flags & CMD_STALE) || int is_denystale_command = !(c->cmd->flags & CMD_STALE) ||
(c->cmd->proc == execCommand && (c->mstate.cmd_inv_flags & CMD_STALE)); (c->cmd->proc == execCommand && (c->mstate.cmd_inv_flags & CMD_STALE));
int is_denyloading_command = !(c->cmd->flags & CMD_LOADING) || int is_denyloading_command = strcmp(c->cmd->name, "ping") && (!(c->cmd->flags & CMD_LOADING) ||
(c->cmd->proc == execCommand && (c->mstate.cmd_inv_flags & CMD_LOADING)); (c->cmd->proc == execCommand && (c->mstate.cmd_inv_flags & CMD_LOADING)));
/* Check if the user is authenticated. This check is skipped in case /* Check if the user is authenticated. This check is skipped in case
* the default user is flagged as "nopass" and is active. */ * the default user is flagged as "nopass" and is active. */