]> granicus.if.org Git - curl/commitdiff
Properly wait for the c-ares resolve to complete, hopefully the cure for
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Jun 2007 13:32:49 +0000 (13:32 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 11 Jun 2007 13:32:49 +0000 (13:32 +0000)
bug #1733955

lib/hostares.c

index 3aa7782bba35d97535774b8b9389aaaa6a2b1f0e..92a0bebb6352bfa819f2fc7dc287c6a931365940 100644 (file)
@@ -253,8 +253,9 @@ CURLcode Curl_wait_for_resolv(struct connectdata *conn,
 
     tvp = ares_timeout(data->state.areschannel, &store, &tv);
 
-    if(!ares_waitperform(conn, tv.tv_sec * 1000 + tv.tv_usec/1000))
-      /* no sockets to wait on, get out of the loop */
+    ares_waitperform(conn, timeout);
+
+    if(conn->async.done)
       break;
 
     timediff = Curl_tvdiff(Curl_tvnow(), now); /* spent time */