diff options
Diffstat (limited to 'src/tcp_socket.cpp')
-rw-r--r-- | src/tcp_socket.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp index f1b1d19..e7a69e4 100644 --- a/src/tcp_socket.cpp +++ b/src/tcp_socket.cpp @@ -162,6 +162,11 @@ int zmq::tcp_socket_t::open (fd_t fd_, uint64_t sndbuf_, uint64_t rcvbuf_) errno_assert (rc == 0); } +#if defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_FREEBSD + int set = 1; + int rc = setsockopt (s, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof (int)); + errno_assert (rc == 0); +#endif return 0; } |