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.
This commit is contained in:
xbasel 2022-10-30 01:24:12 +02:00 committed by GitHub
parent c0d7226274
commit 5b102e2339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -403,6 +403,11 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags)
* some event fires. */
numevents = aeApiPoll(eventLoop, tvp);
/* Don't process file events if not requested. */
if (!(flags & AE_FILE_EVENTS)) {
numevents = 0;
}
/* After sleep callback. */
if (eventLoop->aftersleep != NULL && flags & AE_CALL_AFTER_SLEEP)
eventLoop->aftersleep(eventLoop);