diff options
author | jokea <tfengjun@gmail.com> | 2012-06-29 12:06:38 +0800 |
---|---|---|
committer | jokea <tfengjun@gmail.com> | 2012-06-29 12:06:38 +0800 |
commit | 93b0075d33292bb74bccb60d205da2c2f2041f1d (patch) | |
tree | 85804e1d707ccc40c0d536283ce1a967687ab48a | |
parent | 36def8fd9a4f562612e00ecbc7b5ff46b5809ba3 (diff) | |
download | redis-93b0075d33292bb74bccb60d205da2c2f2041f1d.tar.gz |
mark fd as writable when EPOLLERR or EPOLLHUP is returned by epoll_wait.
-rw-r--r-- | src/ae_epoll.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ae_epoll.c b/src/ae_epoll.c index cac10d67f..0231f2435 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; } |