summaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-11-23 13:05:00 +0100
committerantirez <antirez@gmail.com>2017-11-23 13:05:37 +0100
commitd21f4769b82f07d2b06be20e80720e71c674f3bd (patch)
treef2136b833786bd43b04d207a759ea5347e94d5e3 /src/server.c
parent57bd8feb8d81064cd53a7f124e7509134fb7459b (diff)
downloadredis-modules-replication.tar.gz
Modules: fix for scripting replication of modules commands.modules-replication
See issue #4466 / #4467.
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c
index c9972115a..69dca456e 100644
--- a/src/server.c
+++ b/src/server.c
@@ -2265,8 +2265,9 @@ void call(client *c, int flags) {
propagate_flags &= ~PROPAGATE_AOF;
/* Call propagate() only if at least one of AOF / replication
- * propagation is needed. */
- if (propagate_flags != PROPAGATE_NONE)
+ * propagation is needed. Note that modules commands handle replication
+ * in an explicit way, so we never replicate them automatically. */
+ if (propagate_flags != PROPAGATE_NONE && !(c->cmd->flags & CMD_MODULE))
propagate(c->cmd,c->db->id,c->argv,c->argc,propagate_flags);
}