Commit bf180440 authored by antirez's avatar antirez
Browse files

Modules: associate a fake client to cluster message context callback.

Fixes #5354.
parent 81c4be42
...@@ -3938,6 +3938,8 @@ void moduleCallClusterReceivers(const char *sender_id, uint64_t module_id, uint8 ...@@ -3938,6 +3938,8 @@ void moduleCallClusterReceivers(const char *sender_id, uint64_t module_id, uint8
if (r->module_id == module_id) { if (r->module_id == module_id) {
RedisModuleCtx ctx = REDISMODULE_CTX_INIT; RedisModuleCtx ctx = REDISMODULE_CTX_INIT;
ctx.module = r->module; ctx.module = r->module;
ctx.client = moduleKeyspaceSubscribersClient;
selectDb(ctx.client, 0);
r->callback(&ctx,sender_id,type,payload,len); r->callback(&ctx,sender_id,type,payload,len);
moduleFreeContext(&ctx); moduleFreeContext(&ctx);
return; return;
......
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