diff options
author | xbasel <103044017+xbasel@users.noreply.github.com> | 2022-10-30 01:24:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-29 16:24:12 -0700 |
commit | 5b102e2339f45f1a688215496a884893accec527 (patch) | |
tree | 73aac091a647ac70930cf0b8f179f7c006154f0d /src | |
parent | c0d7226274feb6a519a17a169421295da827a30c (diff) | |
download | redis-5b102e2339f45f1a688215496a884893accec527.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ae.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |