]> granicus.if.org Git - curl/commitdiff
Roy Shan fixed a case that prevented ares name resolve timeouts to occur.
authorDaniel Stenberg <daniel@haxx.se>
Wed, 31 Mar 2004 20:50:01 +0000 (20:50 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 31 Mar 2004 20:50:01 +0000 (20:50 +0000)
lib/hostip.c

index ab372c40a3165f2443be32b0f417d711a45612b0..8e02e470108f4fce8fe41fe720bb9b0bd12bc7c3 100644 (file)
@@ -587,8 +587,9 @@ CURLcode Curl_is_resolved(struct connectdata *conn,
   count = select(nfds, &read_fds, &write_fds, NULL,
                  (struct timeval *)&tv);
 
-  if(count)
-    ares_process(data->state.areschannel, &read_fds, &write_fds);
+  /* Call ares_process() unconditonally here, even if we simply timed out
+     above, as otherwise the ares name resolve won't timeout! */
+  ares_process(data->state.areschannel, &read_fds, &write_fds);
 
   *dns = NULL;