Unverified Commit 5b102e23 authored by xbasel's avatar xbasel Committed by GitHub
Browse files

Don't process file events if AE_FILE_EVENTS isn't set. (#11428)

All current usage of the function are correct, but in the future it might change.
parent c0d72262
...@@ -403,6 +403,11 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags) ...@@ -403,6 +403,11 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags)
* some event fires. */ * some event fires. */
numevents = aeApiPoll(eventLoop, tvp); numevents = aeApiPoll(eventLoop, tvp);
/* Don't process file events if not requested. */
if (!(flags & AE_FILE_EVENTS)) {
numevents = 0;
}
/* After sleep callback. */ /* After sleep callback. */
if (eventLoop->aftersleep != NULL && flags & AE_CALL_AFTER_SLEEP) if (eventLoop->aftersleep != NULL && flags & AE_CALL_AFTER_SLEEP)
eventLoop->aftersleep(eventLoop); eventLoop->aftersleep(eventLoop);
......
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