]> granicus.if.org Git - libevent/commit
evdns: add max-probe-timeout/probe-backoff-factor settings
authorchux0519 <chuxdesign@hotmail.com>
Sat, 9 Jan 2021 09:19:27 +0000 (17:19 +0800)
committerAzat Khuzhin <azat@libevent.org>
Tue, 12 Jan 2021 07:56:13 +0000 (10:56 +0300)
commit617ba838746287974505c6a9c4de6c65172ea112
treee560a465f6e5ac803b595bcc3404ba981e6c92a5
parentc5e4391b86ab0198c9878620d566a66043bd1f43
evdns: add max-probe-timeout/probe-backoff-factor settings

I recently found that when the network status changed when calling
bufferevent_socket_connect_hostname (e.g. switching between several
WIFIs), all DNS servers would fail, and the timeout of probe would be
very long if there were many DNS requests. I want libevent to support
manual setting of MAX_PROBE_TIMEOUT and TIMEOUT_BACKOFF_FACTOR

So move hardcoded MAX_PROBE_TIMEOUT and TIMEOUT_BACKOFF_FACTOR into
struct, and allow changing them.
evdns.c
include/event2/dns.h
test/regress_dns.c