Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set fd to writable when poll(2) detects POLLERR or POLLHUP event.

  • Loading branch information...
commit c6ee2fd59594e89b1871fea6c73535e2bf8920bd 1 parent 8a599d3
@jokea jokea authored committed
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/ae.c
View
2  src/ae.c
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.