Only set TCP_NODELAY when it exists
This commit is contained in:
parent
1b0b7fa0e1
commit
00142d8443
@ -897,6 +897,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TCP_NODELAY
|
||||||
/*
|
/*
|
||||||
* Disable the Nagle algorithm (only relevant for TCP sockets, and thus not in
|
* Disable the Nagle algorithm (only relevant for TCP sockets, and thus not in
|
||||||
* configure_socket). In general, in DNS lookups we're pretty much interested
|
* configure_socket). In general, in DNS lookups we're pretty much interested
|
||||||
@ -910,6 +911,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
|
|||||||
closesocket(s);
|
closesocket(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Connect to the server. */
|
/* Connect to the server. */
|
||||||
memset(&sockin, 0, sizeof(sockin));
|
memset(&sockin, 0, sizeof(sockin));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user