From e089e61019a4d59eacb6340f0c58dc7bf3b61fd3 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 25 Oct 2011 19:54:10 +0200 Subject: [PATCH] Don't timeout scripts if the instance is a slave. --- src/scripting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting.c b/src/scripting.c index 18a0a81e..d1e85e26 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -606,7 +606,7 @@ void evalGenericCommand(redisClient *c, int evalsha) { * is running for too much time. * We set the hook only if the time limit is enabled as the hook will * make the Lua script execution slower. */ - if (server.lua_time_limit > 0) { + if (server.lua_time_limit > 0 && server.masterhost != NULL) { lua_sethook(lua,luaMaskCountHook,LUA_MASKCOUNT,100000); server.lua_time_start = ustime()/1000; } else { -- 2.45.2