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
d5059ba5
Unverified
Commit
d5059ba5
authored
Nov 11, 2020
by
tzongw
Committed by
GitHub
Nov 11, 2020
Browse files
Invalidate aeTimer when returning AE_NOMORE (#8022)
parent
dd1f20ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
d5059ba5
...
@@ -5453,7 +5453,12 @@ int moduleTimerHandler(struct aeEventLoop *eventLoop, long long id, void *client
...
@@ -5453,7 +5453,12 @@ int moduleTimerHandler(struct aeEventLoop *eventLoop, long long id, void *client
/* Reschedule the next timer or cancel it. */
/* Reschedule the next timer or cancel it. */
if
(
next_period
<=
0
)
next_period
=
1
;
if
(
next_period
<=
0
)
next_period
=
1
;
return
(
raxSize
(
Timers
)
>
0
)
?
next_period
:
AE_NOMORE
;
if
(
raxSize
(
Timers
)
>
0
)
{
return
next_period
;
}
else
{
aeTimer
=
-
1
;
return
AE_NOMORE
;
}
}
}
/* Create a new timer that will fire after `period` milliseconds, and will call
/* Create a new timer that will fire after `period` milliseconds, and will call
...
...
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