On Thu, 12 Feb 2009, Alexey Simak wrote:
> adig hangs when both ARES_FLAG_USEVC and ARES_FLAG_STAYOPEN flags are used.
>
> Since tcp socket is not closed when all queries are done ares_fds()
> functions sets tcp socket to read_fds and returns 1. So we leave the next
> loop only if server closes the connection:
Right, the loop can't assume that it should continue as long as there are
sockets if there are always at least one.
I figure you need to make the loop terminate based on response from the DNS
server or a timeout or similar.
-- / daniel.haxx.seReceived on 2009-02-13