Skip to content

Commit

Permalink
Allow AUTH when Redis is busy because of timedout Lua script.
Browse files Browse the repository at this point in the history
If the server is password protected we need to accept AUTH when there is
a server busy (-BUSY) condition, otherwise it will be impossible to send
SHUTDOWN NOSAVE or SCRIPT KILL.

This fixes issue #708.
  • Loading branch information
antirez committed Oct 11, 2012
1 parent d10a01b commit be6cbd3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1667,6 +1667,7 @@ int processCommand(redisClient *c) {

/* Lua script too slow? Only allow commands with REDIS_CMD_STALE flag. */
if (server.lua_timedout &&
c->cmd->proc != authCommand &&
!(c->cmd->proc == shutdownCommand &&
c->argc == 2 &&
tolower(((char*)c->argv[1]->ptr)[0]) == 'n') &&
Expand Down

0 comments on commit be6cbd3

Please sign in to comment.