Commit 40531be0 authored by antirez's avatar antirez
Browse files

call lua_gc() for incremental garbage collection. Likely there is to tune this at some point.

parent c2a7dd85
......@@ -380,8 +380,10 @@ void evalCommand(redisClient *c) {
addReplyErrorFormat(c,"Error running script (call to %s): %s\n",
funcname, lua_tostring(lua,-1));
lua_pop(lua,1);
lua_gc(lua,LUA_GCCOLLECT,0);
return;
}
selectDb(c,server.lua_client->db->id); /* set DB ID from Lua client */
luaReplyToRedisReply(c,lua);
lua_gc(lua,LUA_GCSTEP,1);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment