]> git.kaiwu.me - nginx.git/commit
Resolver: retry sending queries on errors (ticket #1511).
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 5 Jul 2018 19:21:14 +0000 (22:21 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 5 Jul 2018 19:21:14 +0000 (22:21 +0300)
commitf62d460d5bb4b89c7932b4193023bee7f522249a
tree44e1b2af361346dfe59de4b1e771b0f5804c7d1d
parentf206a112c6f9b1701a2dbb8c45340b9dfc964f0b
Resolver: retry sending queries on errors (ticket #1511).

Errors when sending UDP datagrams can happen, e.g., when local IP address
changes (see fa0e093b64d7), or an unavailable DNS server on the LAN can cause
send() to fail with EHOSTDOWN on BSD systems.  If this happens during
initial query, retry sending immediately, to a different DNS server when
possible.  If this is not enough, allow normal resend to happen by ignoring
the return code of the second ngx_resolver_send_query() call, much like we
do in ngx_resolver_resend().
src/core/ngx_resolver.c