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
775adf54
Commit
775adf54
authored
Apr 14, 2018
by
zhaozhao.zz
Browse files
Modules Timer API: fix wrong raxInsert() usage
parent
e07af6a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
775adf54
...
...
@@ -4206,9 +4206,8 @@ RedisModuleTimerID RM_CreateTimer(RedisModuleCtx *ctx, mstime_t period, RedisMod
while(1) {
key = htonu64(expiretime);
int retval = raxInsert(Timers,(unsigned char*)&key,sizeof(key),timer,NULL);
if (retval) {
expiretime = key;
if (raxFind(Timers, (unsigned char*)&key,sizeof(key)) == raxNotFound) {
raxInsert(Timers,(unsigned char*)&key,sizeof(key),timer,NULL);
break;
} else {
expiretime++;
...
...
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