mirror of https://github.com/getdnsapi/getdns.git
Make TLS Handshake timeout max 4/5th of timeout
for the query, just like connection setup timeout was, so fallback transport have a chance too when TCP connection setup is less well detectable (as with TCP_FASTOPEN on MacOS).
This commit is contained in:
parent
0b01ad8e6f
commit
73cee29f55
|
@ -1,4 +1,8 @@
|
||||||
* 2020-0?-??: Version 1.6.1-rc.1
|
* 2020-0?-??: Version 1.6.1-rc.1
|
||||||
|
* Make TLS Handshake timeout max 4/5th of timeout for the query,
|
||||||
|
just like connection setup timeout was, so fallback transport
|
||||||
|
have a chance too when TCP connection setup is less well
|
||||||
|
detectable (as with TCP_FASTOPEN on MacOS).
|
||||||
* Issue #466: Memory leak with retrying queries (for examples
|
* Issue #466: Memory leak with retrying queries (for examples
|
||||||
with search paths). Thanks doublez13.
|
with search paths). Thanks doublez13.
|
||||||
|
|
||||||
|
|
|
@ -984,7 +984,7 @@ tls_do_handshake(getdns_upstream *upstream)
|
||||||
int r;
|
int r;
|
||||||
while ((r = _getdns_tls_connection_do_handshake(upstream->tls_obj)) != GETDNS_RETURN_GOOD)
|
while ((r = _getdns_tls_connection_do_handshake(upstream->tls_obj)) != GETDNS_RETURN_GOOD)
|
||||||
{
|
{
|
||||||
uint64_t timeout_tls = _getdns_ms_until_expiry(upstream->expires);
|
uint64_t timeout_tls = _getdns_ms_until_expiry(upstream->expires)/5*4;
|
||||||
|
|
||||||
if (timeout_tls < MIN_TLS_HS_TIMEOUT)
|
if (timeout_tls < MIN_TLS_HS_TIMEOUT)
|
||||||
timeout_tls = MIN_TLS_HS_TIMEOUT;
|
timeout_tls = MIN_TLS_HS_TIMEOUT;
|
||||||
|
|
Loading…
Reference in New Issue