X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=inline;f=src%2Fnet_socket.c;h=5464b95f8071ca57ee479270e32ffcf3c23e0b25;hb=a5df8a6eac570fc0f3b10cfcdeb9ccccc8dd1ac1;hp=51a79c1d4cf54569aa74bdb37f34c297ea306ef0;hpb=fe7be9e345bcc652914ef6fc51302da13d4c9c8d;p=meshlink diff --git a/src/net_socket.c b/src/net_socket.c index 51a79c1d..5464b95f 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -71,6 +71,11 @@ static void configure_tcp(connection_t *c) { int lowdelay = IPTOS_LOWDELAY; setsockopt(c->socket, IPPROTO_IP, IP_TOS, (void *)&lowdelay, sizeof(lowdelay)); #endif + +#if defined(SO_NOSIGPIPE) + int nosigpipe = 1; + setsockopt(c->socket, SOL_SOCKET, SO_NOSIGPIPE, (void *)&nosigpipe, sizeof(nosigpipe)); +#endif } static void retry_outgoing_handler(event_loop_t *loop, void *data) {