diff options
author | Jim Howard <liexusong@qq.com> | 2013-12-06 22:27:00 -0500 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-08-08 10:43:54 +0200 |
commit | a8d3e930bced31cc0f5211cc0874ca6f837faca0 (patch) | |
tree | 0903fd284062c82ba5f951cec0943334c0ed1f71 /src/ae.c | |
parent | f510cfb4ef724987a145ffbbba00230e976787bf (diff) | |
download | redis-a8d3e930bced31cc0f5211cc0874ca6f837faca0.tar.gz |
Remove redundant event loop fd processing
Reason:
https://github.com/antirez/redis/pull/1450#issuecomment-30432925
Closes #1450
Diffstat (limited to 'src/ae.c')
-rw-r--r-- | src/ae.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -156,8 +156,9 @@ void aeDeleteFileEvent(aeEventLoop *eventLoop, int fd, int mask) { if (fd >= eventLoop->setsize) return; aeFileEvent *fe = &eventLoop->events[fd]; - if (fe->mask == AE_NONE) return; + + aeApiDelEvent(eventLoop, fd, mask); fe->mask = fe->mask & (~mask); if (fd == eventLoop->maxfd && fe->mask == AE_NONE) { /* Update the max fd */ @@ -167,7 +168,6 @@ void aeDeleteFileEvent(aeEventLoop *eventLoop, int fd, int mask) if (eventLoop->events[j].mask != AE_NONE) break; eventLoop->maxfd = j; } - aeApiDelEvent(eventLoop, fd, mask); } int aeGetFileEvents(aeEventLoop *eventLoop, int fd) { |