mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Revert Joshua Kwan's patch committed 11 Sep 2009.
Some systems poll function sets POLLHUP in revents without setting POLLIN, and sets POLLERR without setting POLLIN and POLLOUT. In some libcurl code execution paths this could trigger busy wait loops with high CPU usage until a timeout condition aborted the loop. The reverted patch addressed the above issue for a very specific case, when awaiting c-ares to resolve. A libcurl-wide fix superceeds this one. http://cool.haxx.se/cvs.cgi/curl/lib/select.c.diff?r1=1.52&r2=1.53
This commit is contained in:
parent
c67c4e7095
commit
7e0b0763fc
@ -169,14 +169,10 @@ static int ares_waitperform(struct connectdata *conn, int timeout_ms)
|
||||
else {
|
||||
/* move through the descriptors and ask for processing on them */
|
||||
for(i=0; i < num; i++)
|
||||
/*
|
||||
* Following the advice from:
|
||||
* http://lists.danga.com/pipermail/memcached/2003-October/000336.html
|
||||
*/
|
||||
ares_process_fd(data->state.areschannel,
|
||||
pfd[i].revents & (POLLRDNORM|POLLIN|POLLERR|POLLHUP)?
|
||||
pfd[i].revents & (POLLRDNORM|POLLIN)?
|
||||
pfd[i].fd:ARES_SOCKET_BAD,
|
||||
pfd[i].revents & (POLLWRNORM|POLLOUT|POLLERR)?
|
||||
pfd[i].revents & (POLLWRNORM|POLLOUT)?
|
||||
pfd[i].fd:ARES_SOCKET_BAD);
|
||||
}
|
||||
return nfds;
|
||||
|
Loading…
Reference in New Issue
Block a user