]> git.saurik.com Git - redis.git/commitdiff
SHUTDOWN NOSAVE now can stop a non returning script. Issue #466.
authorantirez <antirez@gmail.com>
Thu, 19 Apr 2012 21:35:15 +0000 (23:35 +0200)
committerantirez <antirez@gmail.com>
Thu, 19 Apr 2012 21:36:04 +0000 (23:36 +0200)
src/redis.c

index 46ae3ffa6a97ba01784cd31509af4fda3fb6b0d5..08995115163b29f5e62f6f11bf7553ddc354a532 100644 (file)
@@ -1557,7 +1557,7 @@ int processCommand(redisClient *c) {
 
     /* Lua script too slow? Only allow SHUTDOWN NOSAVE and SCRIPT KILL. */
     if (server.lua_timedout &&
 
     /* Lua script too slow? Only allow SHUTDOWN NOSAVE and SCRIPT KILL. */
     if (server.lua_timedout &&
-        !(c->cmd->proc != shutdownCommand &&
+        !(c->cmd->proc == shutdownCommand &&
           c->argc == 2 &&
           tolower(((char*)c->argv[1]->ptr)[0]) == 'n') &&
         !(c->cmd->proc == scriptCommand &&
           c->argc == 2 &&
           tolower(((char*)c->argv[1]->ptr)[0]) == 'n') &&
         !(c->cmd->proc == scriptCommand &&