Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
9df1f73e
Commit
9df1f73e
authored
Sep 18, 2018
by
antirez
Browse files
Modules: associate a fake client to timer context callback.
parent
bf180440
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
9df1f73e
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment