On Tue, 27 Oct 2009, John Engelhart wrote:

On investigation I found that ares_timeout was returning a timeout of 0 seconds and 0 microseconds. The little digging I've done so far turned up that ares_send.c sets the timeout to 0 seconds and 0 microseconds "by default".

That's the creation of a new query so it just clears the variable, as it hasn't sent off the query yet.

In the end of ares_send() it calls ares__send_query(), and within the ares__send_query() function the timeout is advanced (ares_progress.c line 785 in my case). So when the query is then sent off, it sets the timeout properly.

It would only remain 0+0 if the query for some reason wasn't sent, but then shouldn't it retry pretty fast then?

--

 / daniel.haxx.se

Reply via email to