From d746cfc0182b12435266e70b53e8a931baf36942 Mon Sep 17 00:00:00 2001 From: MonsterDruide1 <5958456@gmail.com> Date: Tue, 21 Feb 2023 20:43:31 +0100 Subject: net: translate ECONNRESET network error --- src/core/internal_network/network.cpp | 4 ++++ src/core/internal_network/network.h | 1 + 2 files changed, 5 insertions(+) (limited to 'src/core/internal_network') diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp index 7494fb62d..f85c73ca6 100644 --- a/src/core/internal_network/network.cpp +++ b/src/core/internal_network/network.cpp @@ -109,6 +109,8 @@ Errno TranslateNativeError(int e) { return Errno::AGAIN; case WSAECONNREFUSED: return Errno::CONNREFUSED; + case WSAECONNRESET: + return Errno::CONNRESET; case WSAEHOSTUNREACH: return Errno::HOSTUNREACH; case WSAENETDOWN: @@ -205,6 +207,8 @@ Errno TranslateNativeError(int e) { return Errno::AGAIN; case ECONNREFUSED: return Errno::CONNREFUSED; + case ECONNRESET: + return Errno::CONNRESET; case EHOSTUNREACH: return Errno::HOSTUNREACH; case ENETDOWN: diff --git a/src/core/internal_network/network.h b/src/core/internal_network/network.h index 36994c22e..1e09a007a 100644 --- a/src/core/internal_network/network.h +++ b/src/core/internal_network/network.h @@ -30,6 +30,7 @@ enum class Errno { NOTCONN, AGAIN, CONNREFUSED, + CONNRESET, HOSTUNREACH, NETDOWN, NETUNREACH, -- cgit v1.2.3