remove duplicate fd lookup in aeProcessEvents (#3886)

Minor code cleanup.
This commit is contained in:
Zerong Yao 2021-05-05 20:12:53 +08:00 committed by GitHub
parent a62801eb53
commit bcc519fa7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,9 +400,9 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags)
eventLoop->aftersleep(eventLoop);
for (j = 0; j < numevents; j++) {
aeFileEvent *fe = &eventLoop->events[eventLoop->fired[j].fd];
int mask = eventLoop->fired[j].mask;
int fd = eventLoop->fired[j].fd;
aeFileEvent *fe = &eventLoop->events[fd];
int mask = eventLoop->fired[j].mask;
int fired = 0; /* Number of events fired for current fd. */
/* Normally we execute the readable event first, and the writable