Skip to content

Commit 1605e15

Browse files
committed
Also check POLLERR, which is used in some situations like async
connect() failure, instead of POLLHUP on Linux.
1 parent 1524e07 commit 1605e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/asyncproxy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ asyncproxy_run(void *args)
266266
}
267267
assert((pfds[i].revents & POLLNVAL) == 0);
268268
}
269-
if (pfds[i].revents & POLLHUP) {
269+
if (pfds[i].revents & (POLLHUP | POLLERR)) {
270270
if (ap->debug > 1) {
271271
fprintf(stderr, "asyncproxy_run(%p): fd %d is gone, out\n", (void *)ap, pfds[i].fd);
272272
fflush(stderr);

0 commit comments

Comments
 (0)