Skip to content

Commit 1dea8b5

Browse files
committed
luaRedisGenericCommand() recursion: just return an error.
Instead of calling redisPanic() to abort the server. Related to issue redis#2302.
1 parent a0ba7b3 commit 1dea8b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripting.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) {
220220
* To make this function reentrant is futile and makes it slower, but
221221
* we should at least detect such a misuse, and abort. */
222222
if (inuse) {
223-
redisPanic("luaRedisGenericCommand() recursive call detected. Are you doing funny stuff with Lua debug hooks?");
223+
luaPushError(lua,
224+
"luaRedisGenericCommand() recursive call detected. Are you doing funny stuff with Lua debug hooks?");
225+
return 1;
224226
}
225227
inuse++;
226228

0 commit comments

Comments
 (0)