diff options
author | antirez <antirez@gmail.com> | 2018-09-18 13:19:33 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2018-09-18 13:19:33 +0200 |
commit | 9df1f73e4c32b2bfc54471761b64f2b86c5b913b (patch) | |
tree | ea5cb34547dbac77018a22fe7a43d584016c308e | |
parent | bf18044082aaf740dc8292907f990f6c2b0b600a (diff) | |
download | redis-9df1f73e4c32b2bfc54471761b64f2b86c5b913b.tar.gz |
Modules: associate a fake client to timer context callback.
-rw-r--r-- | src/module.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c index 0a043434d..eed9770b5 100644 --- a/src/module.c +++ b/src/module.c @@ -4184,6 +4184,8 @@ int moduleTimerHandler(struct aeEventLoop *eventLoop, long long id, void *client RedisModuleCtx ctx = REDISMODULE_CTX_INIT; ctx.module = timer->module; + ctx.client = moduleKeyspaceSubscribersClient; + selectDb(ctx.client, 0); timer->callback(&ctx,timer->data); moduleFreeContext(&ctx); raxRemove(Timers,(unsigned char*)ri.key,ri.key_len,NULL); |