"tests/unit/vscode:/vscode.git/clone" did not exist on "6016973ac01b8b85a0361f885212b83443187304"
Commit a5a037bf authored by jokea's avatar jokea Committed by antirez
Browse files

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

parent 4dada1b5
...@@ -385,6 +385,8 @@ int aeWait(int fd, int mask, long long milliseconds) { ...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment