From 1dea8b5a298aa62ff25231d6a4bdc1993b2608b8 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 20 Jan 2015 23:13:47 +0100 Subject: [PATCH] luaRedisGenericCommand() recursion: just return an error. Instead of calling redisPanic() to abort the server. Related to issue #2302. --- src/scripting.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripting.c b/src/scripting.c index 5a020a73..140799b0 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -220,7 +220,9 @@ 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) { - redisPanic("luaRedisGenericCommand() recursive call detected. Are you doing funny stuff with Lua debug hooks?"); + luaPushError(lua, + "luaRedisGenericCommand() recursive call detected. Are you doing funny stuff with Lua debug hooks?"); + return 1; } inuse++; -- GitLab