summaryrefslogtreecommitdiff
path: root/src/ae.c
diff options
context:
space:
mode:
authorJim Howard <liexusong@qq.com>2013-12-06 22:27:00 -0500
committerantirez <antirez@gmail.com>2014-08-08 10:43:54 +0200
commita8d3e930bced31cc0f5211cc0874ca6f837faca0 (patch)
tree0903fd284062c82ba5f951cec0943334c0ed1f71 /src/ae.c
parentf510cfb4ef724987a145ffbbba00230e976787bf (diff)
downloadredis-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ae.c b/src/ae.c
index 164f8fdeb..63a1ab4eb 100644
--- a/src/ae.c
+++ b/src/ae.c
@@ -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) {