提交 c2a1905b 编写于 作者: A antirez

Lua max exec time fixes: redisLog() to log the event moved before the...

Lua max exec time fixes: redisLog() to log the event moved before the lua_error() call that does a long jump so never returns. Aesthetic fixes in error message.
上级 50b6429d
......@@ -206,9 +206,9 @@ void luaMaskCountHook(lua_State *lua, lua_Debug *ar) {
if (server.lua_time_limit <= 0) return;
elapsed = (ustime()/1000) - server.lua_time_start;
if (elapsed >= server.lua_time_limit) {
lua_pushstring(lua,"Script aborted for max execution time...");
redisLog(REDIS_NOTICE,"Lua script aborted for max execution time after %lld milliseconds of running time.",elapsed);
lua_pushstring(lua,"Script aborted for max execution time.");
lua_error(lua);
redisLog(REDIS_NOTICE,"Lua script aborted for max execution time after %lld milliseconds of running time",elapsed);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册