tcp: (Mac OS X) added setsockopt(SOL_SOCKET, SO_NOSIGPIPE) to prevent the application crashing on a broken socket.
This commit is contained in:
parent
7e658b9dc4
commit
3581d27f08
@ -276,6 +276,14 @@ BOOL tcp_set_keep_alive_mode(rdpTcp* tcp)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __MACOSX__
|
||||
option_value = 1;
|
||||
option_len = sizeof(option_value);
|
||||
if (setsockopt(tcp->sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *) &option_value, option_len) < 0)
|
||||
{
|
||||
perror("setsockopt() SOL_SOCKET, SO_NOSIGPIPE:");
|
||||
}
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user