diff options
author | antirez <antirez@gmail.com> | 2015-01-20 23:20:12 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-01-22 10:36:23 +0100 |
commit | 18dc769104e895837a33997372ce1c53f5750dd6 (patch) | |
tree | 69adc840a9abab8dc18f069a701d54da374f7145 | |
parent | 1dea8b5a298aa62ff25231d6a4bdc1993b2608b8 (diff) | |
download | redis-18dc769104e895837a33997372ce1c53f5750dd6.tar.gz |
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.
-rw-r--r-- | src/scripting.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/scripting.c b/src/scripting.c index 140799b09..46c0de9a2 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -220,8 +220,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++; |