From cb862c0e254d3a39ae56894dd8602e3e3a805596 Mon Sep 17 00:00:00 2001 From: no92 Date: Sun, 4 Aug 2024 20:56:11 +0200 Subject: [PATCH] sysdeps/managarm: handle ECONNREFUSED in sys_connect --- sysdeps/managarm/generic/socket.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/managarm/generic/socket.cpp b/sysdeps/managarm/generic/socket.cpp index c04eec9fb5..222b4cd737 100644 --- a/sysdeps/managarm/generic/socket.cpp +++ b/sysdeps/managarm/generic/socket.cpp @@ -161,6 +161,8 @@ int sys_connect(int fd, const struct sockaddr *addr_ptr, socklen_t addr_length) return ENOENT; } else if(resp.error() == managarm::fs::Errors::ILLEGAL_ARGUMENT) { return EINVAL; + } else if(resp.error() == managarm::fs::Errors::CONNECTION_REFUSED) { + return ECONNREFUSED; } __ensure(resp.error() == managarm::fs::Errors::SUCCESS);