Archive Index This month's Index

Subject: Re: Problem in adig when used both ARES_FLAG_USEVC and ARES_FLAG_STAYOPEN flags.

Re: Problem in adig when used both ARES_FLAG_USEVC and ARES_FLAG_STAYOPEN flags.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 13 Feb 2009 10:46:13 +0100 (CET)

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.se
Received on 2009-02-13