Set fd to writable when poll(2) detects POLLERR or POLLHUP event.
This commit is contained in:
parent
348ee1a40a
commit
e150ce3ce6
2
src/ae.c
2
src/ae.c
@ -385,6 +385,8 @@ int aeWait(int fd, int mask, long long milliseconds) {
|
|||||||
if ((retval = poll(&pfd, 1, milliseconds))== 1) {
|
if ((retval = poll(&pfd, 1, milliseconds))== 1) {
|
||||||
if (pfd.revents & POLLIN) retmask |= AE_READABLE;
|
if (pfd.revents & POLLIN) retmask |= AE_READABLE;
|
||||||
if (pfd.revents & POLLOUT) retmask |= AE_WRITABLE;
|
if (pfd.revents & POLLOUT) retmask |= AE_WRITABLE;
|
||||||
|
if (pfd.revents & POLLERR) retmask |= AE_WRITABLE;
|
||||||
|
if (pfd.revents & POLLHUP) retmask |= AE_WRITABLE;
|
||||||
return retmask;
|
return retmask;
|
||||||
} else {
|
} else {
|
||||||
return retval;
|
return retval;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user