summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-09-18 13:15:36 +0200
committerantirez <antirez@gmail.com>2018-09-18 13:15:40 +0200
commitbf18044082aaf740dc8292907f990f6c2b0b600a (patch)
treef159d0a9bf9e5854f2ef354256676bb712593b7f
parent81c4be42c188d68ed347333addffe062a33d238f (diff)
downloadredis-bf18044082aaf740dc8292907f990f6c2b0b600a.tar.gz
Modules: associate a fake client to cluster message context callback.
Fixes #5354.
-rw-r--r--src/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c
index 12c6c9b5e..0a043434d 100644
--- a/src/module.c
+++ b/src/module.c
@@ -3938,6 +3938,8 @@ void moduleCallClusterReceivers(const char *sender_id, uint64_t module_id, uint8
if (r->module_id == module_id) {
RedisModuleCtx ctx = REDISMODULE_CTX_INIT;
ctx.module = r->module;
+ ctx.client = moduleKeyspaceSubscribersClient;
+ selectDb(ctx.client, 0);
r->callback(&ctx,sender_id,type,payload,len);
moduleFreeContext(&ctx);
return;