mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Modules Timer API: fix wrong raxInsert() usage
This commit is contained in:
parent
e07af6a2b7
commit
775adf544c
@ -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++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user