aboutsummaryrefslogtreecommitdiff
path: root/core/net/errors_linux.odin
diff options
context:
space:
mode:
authorLaytan <laytanlaats@hotmail.com>2025-04-14 21:15:58 +0200
committerLaytan <laytanlaats@hotmail.com>2025-04-14 21:17:22 +0200
commit11da543f26fff002da8281757f141f6a5f690666 (patch)
tree2aed51fd7c5870ce2cde4035f5e6fcf84bd148f1 /core/net/errors_linux.odin
parent0fc141db5de0a635d7f20782e694636af18383f2 (diff)
net: add ECONNRESET to the error handling of recv
Diffstat (limited to 'core/net/errors_linux.odin')
-rw-r--r--core/net/errors_linux.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/net/errors_linux.odin b/core/net/errors_linux.odin
index da9811d71..237579f28 100644
--- a/core/net/errors_linux.odin
+++ b/core/net/errors_linux.odin
@@ -159,7 +159,7 @@ _tcp_recv_error :: proc(errno: linux.Errno) -> TCP_Recv_Error {
return .Invalid_Argument
case .ENOTCONN:
return .Not_Connected
- case .ECONNREFUSED:
+ case .ECONNREFUSED, .ECONNRESET:
return .Connection_Closed
case .ETIMEDOUT:
return .Timeout
@@ -179,7 +179,7 @@ _udp_recv_error :: proc(errno: linux.Errno) -> UDP_Recv_Error {
#partial switch errno {
case .EBADF, .ENOTSOCK, .EFAULT:
return .Invalid_Argument
- case .ECONNREFUSED, .ENOTCONN:
+ case .ECONNREFUSED, .ENOTCONN, .ECONNRESET:
return .Connection_Refused
case .ETIMEDOUT:
return .Timeout