protocols/tcp: Correct implementation of MSG_NOSIGNAL.

The other send_signal invocation correctly checked NOSIGNAL already.
This commit is contained in:
Augustin Cavalier
2023-11-21 23:34:33 -05:00
parent 2b50f7759d
commit f860cfc76c
@@ -846,7 +846,7 @@ TCPEndpoint::SendData(net_buffer *buffer)
if (!is_writable(fState) && !is_establishing(fState)) {
// we only send signals when called from userland
if (gStackModule->is_syscall())
if (gStackModule->is_syscall() && (flags & MSG_NOSIGNAL) == 0)
send_signal(find_thread(NULL), SIGPIPE);
return EPIPE;
}