net/SocketDescriptor: WriteNoWait() uses MSG_NOSIGNAL

This commit is contained in:
Max Kellermann
2024-05-03 13:56:19 +02:00
committed by Max Kellermann
parent 3813433e02
commit 9c421997bf

View File

@@ -484,6 +484,9 @@ SocketDescriptor::WriteNoWait(std::span<const std::byte> src) const noexcept
#ifndef _WIN32 #ifndef _WIN32
flags |= MSG_DONTWAIT; flags |= MSG_DONTWAIT;
#endif #endif
#ifdef __linux__
flags |= MSG_NOSIGNAL;
#endif
return Send(src, flags); return Send(src, flags);
} }