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
7980d87c
Unverified
Commit
7980d87c
authored
Apr 13, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Apr 13, 2018
Browse files
Merge pull request #4842 from soloestoy/fix-timer-api-wrong-insert
Modules Timer API: fix wrong raxInsert() usage
parents
e07af6a2
775adf54
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
7980d87c
...
...
@@ -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