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
1 changed files with 3 additions and 0 deletions

View File

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