aboutsummaryrefslogtreecommitdiff
path: root/lib/select.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-11-13 09:24:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-11-13 09:24:06 +0000
commitc2862742abc76440657190a02a1e92be1e2c01f1 (patch)
treed0d4d4f1758e92b242ec90154474665c5c32e1a4 /lib/select.c
parent8a712eb5afb603465dfe812510dd7077bf626d17 (diff)
Thanks to this nice summary of poll() implementations:
http://www.greenend.org.uk/rjk/2001/06/poll.html and further tests by Eugene Kotlyarov, we now know that cygwin's poll returns only POLLHUP on remote connection closure so we check for that case (too) and re-enable poll for cygwin builds.
Diffstat (limited to 'lib/select.c')
-rw-r--r--lib/select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/select.c b/lib/select.c
index 634f8efda..f370b1110 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -104,7 +104,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
ret = 0;
num = 0;
if (readfd != CURL_SOCKET_BAD) {
- if (pfd[num].revents & POLLIN)
+ if (pfd[num].revents & (POLLIN|POLLHUP))
ret |= CSELECT_IN;
if (pfd[num].revents & POLLERR)
ret |= CSELECT_ERR;