aboutsummaryrefslogtreecommitdiff
path: root/core/net/socket_linux.odin
diff options
context:
space:
mode:
authorRickard Andersson <gonz@severnatazvezda.com>2024-04-19 15:39:04 +0300
committerRickard Andersson <gonz@severnatazvezda.com>2024-04-19 15:39:04 +0300
commit68f663ea8585f0de6ca7d34ecf93031603f22cb6 (patch)
tree539f461c440df1a7193a2153445a9f6253960389 /core/net/socket_linux.odin
parentefc84cd390e6773ee71e35bc851ce4f55f39c34a (diff)
fix(net): fix return type for `send_tcp`
Was `.Connection_Closed` but this is only inferrable if our return type is not a sub-union of another.
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 ee3a41927..a4d75b92b 100644
--- a/core/net/socket_linux.odin
+++ b/core/net/socket_linux.odin
@@ -262,7 +262,7 @@ _send_tcp :: proc(tcp_sock: TCP_Socket, buf: []byte) -> (int, Network_Error) {
if errno == .EPIPE {
// If the peer is disconnected when we are trying to send we will get an `EPIPE` error,
// so we turn that into a clearer error
- return total_written, .Connection_Closed
+ return total_written, TCP_Send_Error.Connection_Closed
} else if errno != .NONE {
return total_written, TCP_Send_Error(errno)
}