network engine: properly apply flag MSG_NOSIGNAL

This commit is contained in:
Adrien Béraud committed 2018-05-25 10:26:58 -04:00
1 parent 60db9fd9cd
commit b2171d707a
1 file changed
+1 -1
+1 -1
View File
@@ -661,7 +661,7 @@ NetworkEngine::send(const char *buf, size_t len, int flags, const SockAddr& addr
if (s < 0)
return EAFNOSUPPORT;
#ifdef MSG_NOSIGNAL
flags &= MSG_NOSIGNAL;
flags |= MSG_NOSIGNAL;
#endif
if (sendto(s, buf, len, flags, addr.get(), addr.getLength()) == -1) {
int err = errno;