diff options
author | Steinar H. Gunderson <sesse@google.com> | 2007-09-29 14:25:14 +0000 |
---|---|---|
committer | Steinar H. Gunderson <sesse@google.com> | 2007-09-29 14:25:14 +0000 |
commit | 95c15fce0c92d93684aa11b2bfd0a92bfbf9d1da (patch) | |
tree | f9d1ac4c0eeba93863f1a77ffa677c4da2762e63 | |
parent | c788efffd4c1b00494813639549f3fde36761c8f (diff) |
TCP queries can time out too, not just UDP queries. (Patch from the Google tree.)
-rw-r--r-- | ares/ares_process.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ares/ares_process.c b/ares/ares_process.c index 9e03e4034..2171011e0 100644 --- a/ares/ares_process.c +++ b/ares/ares_process.c @@ -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); } /* |