mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-21 22:28:34 -04:00
Fix delv default timeout value
The isc_nm_getinitialtimeout() function (and also the previously used isc_nm_gettimeouts() function) returns timeout value(s) in milliseconds, while the dns_request_create() function expects timeout values in seconds. Fix the bug by dividing the timeout value by MS_PER_SEC. There is no added test, because it turns out delv doesn't support setting custom timeout values (as opposed to what is suggested in its man page). Tests should be added later when the '+timeout=T' option is implemented.
This commit is contained in:
parent
74a8acdc8d
commit
e3417d55fd
1 changed files with 2 additions and 1 deletions
|
|
@ -2096,7 +2096,8 @@ sendquery(void *arg) {
|
|||
|
||||
dns_view_attach(view, &(dns_view_t *){ NULL });
|
||||
|
||||
const unsigned int timeout = isc_nm_getinitialtimeout(netmgr);
|
||||
const unsigned int timeout = isc_nm_getinitialtimeout(netmgr) /
|
||||
MS_PER_SEC;
|
||||
CHECK(dns_request_create(requestmgr, message, NULL, &peer, NULL, NULL,
|
||||
DNS_REQUESTOPT_TCP, NULL, timeout, timeout, 0,
|
||||
0, isc_loop(), recvresponse, message,
|
||||
|
|
|
|||
Loading…
Reference in a new issue