mirror of https://mirror.osredm.com/root/redis.git
Call finalizerProc when free the aeTimeEvent in ae (#13101)
Supplement to #6189, we also need to call finalizerProc. This is a minor cleanup, no one currently uses this finalizerProc feature.
This commit is contained in:
parent
df75153d79
commit
33ea432585
2
src/ae.c
2
src/ae.c
|
@ -149,6 +149,8 @@ void aeDeleteEventLoop(aeEventLoop *eventLoop) {
|
||||||
aeTimeEvent *next_te, *te = eventLoop->timeEventHead;
|
aeTimeEvent *next_te, *te = eventLoop->timeEventHead;
|
||||||
while (te) {
|
while (te) {
|
||||||
next_te = te->next;
|
next_te = te->next;
|
||||||
|
if (te->finalizerProc)
|
||||||
|
te->finalizerProc(eventLoop, te->clientData);
|
||||||
zfree(te);
|
zfree(te);
|
||||||
te = next_te;
|
te = next_te;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue