diff options
Diffstat (limited to 'src/scripting.c')
-rw-r--r-- | src/scripting.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/scripting.c b/src/scripting.c index 10e939f34..3ae25152f 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -385,11 +385,11 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) { /* Run the command */ int call_flags = CMD_CALL_SLOWLOG | CMD_CALL_STATS; if (server.lua_replicate_commands) { - call_flags |= CMD_CALL_PROPAGATE; - /* Don't propagate AOf / replication stream if a redis.set_repl() - * call changed the default replication policy. */ - if (!(server.lua_repl & PROPAGATE_AOF)) preventCommandAOF(c); - if (!(server.lua_repl & PROPAGATE_REPL)) preventCommandReplication(c); + /* Set flags according to redis.set_repl() settings. */ + if (server.lua_repl & PROPAGATE_AOF) + call_flags |= CMD_CALL_PROPAGATE_AOF; + if (server.lua_repl & PROPAGATE_REPL) + call_flags |= CMD_CALL_PROPAGATE_REPL; } call(c,call_flags); |