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.
This commit is contained in:
parent
bc8675612f
commit
e467cf5db3
@ -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++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user