From: jokea Date: Fri, 29 Jun 2012 04:06:38 +0000 (+0800) Subject: mark fd as writable when EPOLLERR or EPOLLHUP is returned by epoll_wait. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/8a8e01f4a7d8658d992be1ad45511d4c4f70a1c2 mark fd as writable when EPOLLERR or EPOLLHUP is returned by epoll_wait. --- diff --git a/src/ae_epoll.c b/src/ae_epoll.c index cac10d67..0231f243 100644 --- a/src/ae_epoll.c +++ b/src/ae_epoll.c @@ -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; }