aboutsummaryrefslogtreecommitdiff
path: root/core/net/socket_linux.odin
diff options
context:
space:
mode:
authorRickard Andersson <gonz@severnatazvezda.com>2024-04-19 15:17:21 +0300
committerRickard Andersson <gonz@severnatazvezda.com>2024-04-19 15:17:21 +0300
commitc44f618b7dec82cf80609fd613c93ef91cf6a7ae (patch)
tree37c76ba4e1411dcf3bbde9626cf13c4aa36252ba /core/net/socket_linux.odin
parent1b143b9fa3d0302cda639abf72c7b5db1b7c1c41 (diff)
fix(net): add `NOSIGNAL` to `send` options
This is a better default than not having it, since it turns errors that would be signals into error values instead. We could take these as options but given that we currently don't I think this at the very least improves on the status quo.
Diffstat (limited to 'core/net/socket_linux.odin')
-rw-r--r--core/net/socket_linux.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/net/socket_linux.odin b/core/net/socket_linux.odin
index ba48959fb..9c4342592 100644
--- a/core/net/socket_linux.odin
+++ b/core/net/socket_linux.odin
@@ -258,7 +258,7 @@ _send_tcp :: proc(tcp_sock: TCP_Socket, buf: []byte) -> (int, Network_Error) {
for total_written < len(buf) {
limit := min(int(max(i32)), len(buf) - total_written)
remaining := buf[total_written:][:limit]
- res, errno := linux.send(linux.Fd(tcp_sock), remaining, {})
+ res, errno := linux.send(linux.Fd(tcp_sock), remaining, {.NOSIGNAL})
if errno != .NONE {
return total_written, TCP_Send_Error(errno)
}