mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 09:52:27 -04:00
StreamDNS: opportunistically disable Nagle's algorithm
This commit ensures that Stream DNS code attempts to disable Nagle's algorithm regardless of underlying stream transport (TCP or TLS), as we are not interested in trading latency for throughout when dealing with DNS messages.
This commit is contained in:
parent
05cfb27b80
commit
e89575ddce
1 changed files with 2 additions and 0 deletions
|
|
@ -356,6 +356,7 @@ streamdns_transport_connected(isc_nmhandle_t *handle, isc_result_t result,
|
|||
streamdns_save_alpn_status(sock, handle);
|
||||
isc__nmhandle_set_manual_timer(sock->outerhandle, true);
|
||||
streamhandle = isc__nmhandle_get(sock, &sock->peer, &sock->iface);
|
||||
(void)isc_nmhandle_set_tcp_nodelay(sock->outerhandle, true);
|
||||
streamdns_call_connect_cb(sock, streamhandle, result);
|
||||
isc_nmhandle_detach(&streamhandle);
|
||||
|
||||
|
|
@ -720,6 +721,7 @@ streamdns_accept_cb(isc_nmhandle_t *handle, isc_result_t result, void *cbarg) {
|
|||
isc_nm_gettimeouts(nsock->worker->netmgr, &initial, NULL, NULL, NULL);
|
||||
/* settimeout restarts the timer */
|
||||
isc_nmhandle_settimeout(nsock->outerhandle, initial);
|
||||
(void)isc_nmhandle_set_tcp_nodelay(nsock->outerhandle, true);
|
||||
streamdns_handle_incoming_data(nsock, nsock->outerhandle, NULL, 0);
|
||||
|
||||
exit:
|
||||
|
|
|
|||
Loading…
Reference in a new issue