Commit 9df1f73e authored by antirez's avatar antirez
Browse files

Modules: associate a fake client to timer context callback.

parent bf180440
...@@ -4184,6 +4184,8 @@ int moduleTimerHandler(struct aeEventLoop *eventLoop, long long id, void *client ...@@ -4184,6 +4184,8 @@ int moduleTimerHandler(struct aeEventLoop *eventLoop, long long id, void *client
RedisModuleCtx ctx = REDISMODULE_CTX_INIT; RedisModuleCtx ctx = REDISMODULE_CTX_INIT;
ctx.module = timer->module; ctx.module = timer->module;
ctx.client = moduleKeyspaceSubscribersClient;
selectDb(ctx.client, 0);
timer->callback(&ctx,timer->data); timer->callback(&ctx,timer->data);
moduleFreeContext(&ctx); moduleFreeContext(&ctx);
raxRemove(Timers,(unsigned char*)ri.key,ri.key_len,NULL); raxRemove(Timers,(unsigned char*)ri.key,ri.key_len,NULL);
......
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