diff --git a/common/SoapyRPCSocket.cpp b/common/SoapyRPCSocket.cpp index 8f7234d..69bf538 100644 --- a/common/SoapyRPCSocket.cpp +++ b/common/SoapyRPCSocket.cpp @@ -415,7 +415,7 @@ int SoapyRPCSocket::multicastJoin(const std::string &group, const bool loop, con int SoapyRPCSocket::send(const void *buf, size_t len, int flags) { - int ret = ::send(_sock, (const char *)buf, int(len), flags); + int ret = ::send(_sock, (const char *)buf, int(len), flags | MSG_NOSIGNAL); if (ret == -1) this->reportError("send()"); return ret; } diff --git a/common/SoapySocketDefs.in.hpp b/common/SoapySocketDefs.in.hpp index 19ae419..9bb88b9 100644 --- a/common/SoapySocketDefs.in.hpp +++ b/common/SoapySocketDefs.in.hpp @@ -127,3 +127,10 @@ typedef int socklen_t; #if !defined(IPV6_DROP_MEMBERSHIP) && defined(IPV6_LEAVE_GROUP) #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP #endif + +/*********************************************************************** + * socket flag definitions + **********************************************************************/ +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif