diff -up curl-7.19.5/lib/hostares.c~ curl-7.19.5/lib/hostares.c
--- curl-7.19.5/lib/hostares.c~	2009-07-30 14:53:03.000000000 -0700
+++ curl-7.19.5/lib/hostares.c	2009-07-30 14:52:52.000000000 -0700
@@ -169,10 +169,14 @@ static int ares_waitperform(struct conne
   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)?
+                      pfd[i].revents & (POLLRDNORM|POLLIN|POLLERR|POLLHUP)?
                       pfd[i].fd:ARES_SOCKET_BAD,
-                      pfd[i].revents & (POLLWRNORM|POLLOUT)?
+                      pfd[i].revents & (POLLWRNORM|POLLOUT|POLLERR)?
                       pfd[i].fd:ARES_SOCKET_BAD);
   }
   return nfds;
