mirror of
https://github.com/fluencelabs/redis
synced 2025-05-06 07:52:13 +00:00
Set fd to writable when poll(2) detects POLLERR or POLLHUP event.
This commit is contained in:
parent
8a599d36c0
commit
c6ee2fd595
2
src/ae.c
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user