Request "send" not to trigger SIGPIPE on errors.
diff --git a/lib/client-handshake.c b/lib/client-handshake.c
index de99a20..2dd810c 100644
--- a/lib/client-handshake.c
+++ b/lib/client-handshake.c
@@ -85,7 +85,7 @@
if (context->http_proxy_port) {
- n = send(wsi->sock, context->service_buffer, plen, 0);
+ n = send(wsi->sock, context->service_buffer, plen, MSG_NOSIGNAL);
if (n < 0) {
compatible_close(wsi->sock);
lwsl_debug("ERROR writing to proxy socket\n");
diff --git a/lib/client.c b/lib/client.c
index b6236a2..94a6694 100644
--- a/lib/client.c
+++ b/lib/client.c
@@ -229,7 +229,7 @@
else
#endif
n = send(wsi->sock, context->service_buffer,
- p - (char *)context->service_buffer, 0);
+ p - (char *)context->service_buffer, MSG_NOSIGNAL);
lws_latency(context, wsi,
"send or SSL_write LWS_CONNMODE...HANDSHAKE",
n, n >= 0);