From 065c92d1e9e0574452e92f07b797301c987d5ab4 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 17 Oct 2017 06:44:58 +0200 Subject: Avoid crash due to SIGPIPE in OutputUHDFeedback server --- src/Socket.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Socket.h b/src/Socket.h index 1d9c252..f6a023d 100644 --- a/src/Socket.h +++ b/src/Socket.h @@ -137,7 +137,8 @@ class TCPSocket { { uint8_t *buf = (uint8_t*)buffer; while (buflen > 0) { - ssize_t sent = send(m_sock, buf, buflen, 0); + // Set MSG_NOSIGNAL to avoid that this thread gets a SIGPIPE + ssize_t sent = send(m_sock, buf, buflen, MSG_NOSIGNAL); if (sent < 0) { return -1; } -- cgit v1.2.3