diff options
author | jokea <tfengjun@gmail.com> | 2012-05-23 17:19:49 +0800 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-05-23 11:29:21 +0200 |
commit | c6ee2fd59594e89b1871fea6c73535e2bf8920bd (patch) | |
tree | 5fbd2406c9a3869bb6e6f86f7aff726273dde8c0 | |
parent | 8a599d36c076c11b2a070f894373042f1571167c (diff) | |
download | redis-c6ee2fd59594e89b1871fea6c73535e2bf8920bd.tar.gz |
Set fd to writable when poll(2) detects POLLERR or POLLHUP event.
-rw-r--r-- | src/ae.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -371,6 +371,8 @@ int aeWait(int fd, int mask, long long milliseconds) { if ((retval = poll(&pfd, 1, milliseconds))== 1) { if (pfd.revents & POLLIN) retmask |= AE_READABLE; if (pfd.revents & POLLOUT) retmask |= AE_WRITABLE; + if (pfd.revents & POLLERR) retmask |= AE_WRITABLE; + if (pfd.revents & POLLHUP) retmask |= AE_WRITABLE; return retmask; } else { return retval; |