mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
DoH: use isc_nmhandle_set_tcp_nodelay()
This commit replaces ad-hoc code for disabling Nagle's algorithm with a call to isc_nmhandle_set_tcp_nodelay().
This commit is contained in:
parent
e89575ddce
commit
efe4267044
@ -2423,18 +2423,7 @@ server_send_connection_header(isc_nm_http_session_t *session) {
|
||||
*/
|
||||
static void
|
||||
http_transpost_tcp_nodelay(isc_nmhandle_t *transphandle) {
|
||||
isc_nmsocket_t *tcpsock = NULL;
|
||||
uv_os_fd_t tcp_fd = (uv_os_fd_t)-1;
|
||||
|
||||
if (transphandle->sock->type == isc_nm_tlssocket) {
|
||||
tcpsock = transphandle->sock->outerhandle->sock;
|
||||
} else {
|
||||
tcpsock = transphandle->sock;
|
||||
}
|
||||
|
||||
(void)uv_fileno((uv_handle_t *)&tcpsock->uv_handle.tcp, &tcp_fd);
|
||||
RUNTIME_CHECK(tcp_fd != (uv_os_fd_t)-1);
|
||||
(void)isc__nm_socket_tcp_nodelay((uv_os_sock_t)tcp_fd, true);
|
||||
(void)isc_nmhandle_set_tcp_nodelay(transphandle, true);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
Loading…
x
Reference in New Issue
Block a user