[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Asynchronous DNS
From: |
Alain Schneble |
Subject: |
Re: Asynchronous DNS |
Date: |
Sat, 20 Feb 2016 20:31:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) |
Lars Ingebrigtsen <address@hidden> writes:
> I had assumed that getaddrinfo_a would have the normal timeouts that
> getaddrinfo has -- that it would say that it's failed after a certain
> number of seconds. Some testing here (switching off the wifi after
> issuing a DNS request) seems to indicate that that may not be the case?
I was just looking into the glibc implementation of getaddrinfo_a again.
It invokes getaddrinfo from its worker threads and it seems like it
should not behave differently regarding timeouts. The only timeout I
found was to make the worker threads sleep when there is nothing to do.
But they should get woken up if a new request arrives or they will
eventually die when the timeout has elapsed. But all this should not be
related to the timeout you are referring to.
> I couldn't find anything in the documentation about this... am I
> overlooking something? If not, I have to implement some timeouts myself
> in that code.
But what seems strange to me right now is this code in check_for_dns:
/* The DNS lookup failed. */
else if (!EQ (p->status, Qconnect))
{
...
Actually, I tried it out and DNS lookups seem to timeout quite fast on
my machine if there is no network connection. But they do not enter the
if-branch above. That seems like an error. Am I day-dreaming or
shouldn't it be rewritten to look like this?
/* The DNS lookup failed. */
else if (EQ (p->status, Qconnect))
{
...
- Re: Asynchronous DNS, (continued)
- Re: Asynchronous DNS, Paul Eggert, 2016/02/20
- Re: Asynchronous DNS, Alain Schneble, 2016/02/21
- Re: Asynchronous DNS, YAMAMOTO Mitsuharu, 2016/02/26
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/26
- Re: Asynchronous DNS, Alain Schneble, 2016/02/27
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/27
- Re: Asynchronous DNS, Andreas Schwab, 2016/02/28
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/28
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/28
- Re: Asynchronous DNS, Andreas Schwab, 2016/02/29
- Re: Asynchronous DNS,
Alain Schneble <=
- Re: Asynchronous DNS, Alain Schneble, 2016/02/20
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/20
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/20
- Re: Asynchronous DNS, Alain Schneble, 2016/02/21
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/21
- Re: Asynchronous DNS, Eli Zaretskii, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/21
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/22
- Re: Asynchronous DNS, Lars Ingebrigtsen, 2016/02/21