Skip to content

Commit

Permalink
remove duplicate fd lookup in aeProcessEvents (redis#3886)
Browse files Browse the repository at this point in the history
Minor code cleanup.
  • Loading branch information
zearom32 authored May 5, 2021
1 parent a62801e commit bcc519f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ae.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bcc519f

Please sign in to comment.