]> granicus.if.org Git - curl/commitdiff
TCP queries can time out too, not just UDP queries. (Patch from the Google tree.)
authorSteinar H. Gunderson <sesse@google.com>
Sat, 29 Sep 2007 14:25:14 +0000 (14:25 +0000)
committerSteinar H. Gunderson <sesse@google.com>
Sat, 29 Sep 2007 14:25:14 +0000 (14:25 +0000)
ares/ares_process.c

index 9e03e40340b2bce46dbf6774480bb500afca6a39..2171011e008e9eef6058c717049e699722075247 100644 (file)
@@ -634,7 +634,6 @@ void ares__send_query(ares_channel channel, struct query *query, time_t now)
           server->qhead = sendreq;
         }
       server->qtail = sendreq;
-      query->timeout = 0;
       query->server_info[query->server].tcp_connection_generation =
         server->tcp_connection_generation;
     }
@@ -656,10 +655,10 @@ void ares__send_query(ares_channel channel, struct query *query, time_t now)
           next_server(channel, query, now);
           return;
         }
-      query->timeout = now
-          + ((query->try == 0) ? channel->timeout
-             : channel->timeout << query->try / channel->nservers);
     }
+    query->timeout = now
+        + ((query->try == 0) ? channel->timeout
+           : channel->timeout << query->try / channel->nservers);
 }
 
 /*