Unverified Commit 33ea4325 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

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.
parent df75153d
...@@ -149,6 +149,8 @@ void aeDeleteEventLoop(aeEventLoop *eventLoop) { ...@@ -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;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment