commit 2582b17f3b6519f8ba67ff6ca0c32aaf43156226
Author: Sandro Santilli<address@hidden>
Date: Tue Oct 12 00:43:38 2010 +0200
Request not to send SIGPIPE while sending to socket
diff --git a/libbase/Socket.cpp b/libbase/Socket.cpp
index d276121..3913841 100644
--- a/libbase/Socket.cpp
+++ b/libbase/Socket.cpp
@@ -321,7 +321,7 @@ Socket::write(const void* src, std::streamsize num)
const char* buf = static_cast<const char*>(src);
while (toWrite> 0) {
- bytesSent = ::send(_socket, buf, toWrite, 0);
+ bytesSent = ::send(_socket, buf, toWrite, MSG_NOSIGNAL);
if (bytesSent< 0) {
const int err = errno;
log_error("Socket send error %s", std::strerror(err));