]> git.saurik.com Git - redis.git/commitdiff
mark fd as writable when EPOLLERR or EPOLLHUP is returned by epoll_wait.
authorjokea <tfengjun@gmail.com>
Fri, 29 Jun 2012 04:06:38 +0000 (12:06 +0800)
committerjokea <tfengjun@gmail.com>
Fri, 29 Jun 2012 04:06:38 +0000 (12:06 +0800)
src/ae_epoll.c

index cac10d67f7c01c6936b897e7a3bdc2985463edcf..0231f24358f13b16f2cb675937228cb0e7006794 100644 (file)
@@ -89,6 +89,8 @@ static int aeApiPoll(aeEventLoop *eventLoop, struct timeval *tvp) {
 
             if (e->events & EPOLLIN) mask |= AE_READABLE;
             if (e->events & EPOLLOUT) mask |= AE_WRITABLE;
+            if (e->events & EPOLLERR) mask |= AE_WRITABLE;
+            if (e->events & EPOLLHUP) mask |= AE_WRITABLE;
             eventLoop->fired[j].fd = e->data.fd;
             eventLoop->fired[j].mask = mask;
         }