mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Complain if setsockopt TCP_NODELAY fails
This commit is contained in:
parent
7ef67830af
commit
a5ac8f57f8
@ -117,8 +117,13 @@ ldap_pvt_prepare_socket(LDAP *ld, int fd)
|
||||
#ifdef TCP_NODELAY
|
||||
{
|
||||
int dummy = 1;
|
||||
if ( setsockopt( fd, IPPROTO_TCP, TCP_NODELAY, (char*) &dummy, sizeof(dummy) ) == -1 )
|
||||
return -1;
|
||||
if ( setsockopt( fd, IPPROTO_TCP, TCP_NODELAY,
|
||||
(char*) &dummy, sizeof(dummy) ) == AC_SOCKET_ERROR )
|
||||
{
|
||||
osip_debug(ld, "ldap_prepare_socket: "
|
||||
"setsockopt(%d, TCP_NODELAY) failed (ignored).\n",
|
||||
fd, 0, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user