Unverified Commit bcc519fa authored by Zerong Yao's avatar Zerong Yao Committed by GitHub
Browse files

remove duplicate fd lookup in aeProcessEvents (#3886)

Minor code cleanup.
parent a62801eb
...@@ -400,9 +400,9 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags) ...@@ -400,9 +400,9 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags)
eventLoop->aftersleep(eventLoop); eventLoop->aftersleep(eventLoop);
for (j = 0; j < numevents; j++) { 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; 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. */ int fired = 0; /* Number of events fired for current fd. */
/* Normally we execute the readable event first, and the writable /* Normally we execute the readable event first, and the writable
......
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