提交 26698af3 编写于 作者: A antirez

luaRedisGenericCommand(): log error at WARNING level when re-entered.

Rationale is that when re-entering, it is likely due to Lua debugging
hooks. Returning an error will be ignored in most cases, going totally
unnoticed. With the log at least we leave a trace.

Related to issue #2302.
上级 9b92eddd
......@@ -221,8 +221,11 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
* To make this function reentrant is futile and makes it slower, but
* we should at least detect such a misuse, and abort. */
if (inuse) {
luaPushError(lua,
"luaRedisGenericCommand() recursive call detected. Are you doing funny stuff with Lua debug hooks?");
char *recursion_warning =
"luaRedisGenericCommand() recursive call detected. "
"Are you doing funny stuff with Lua debug hooks?";
redisLog(REDIS_WARNING,"%s",recursion_warning);
luaPushError(lua,recursion_warning);
return 1;
}
inuse++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册