From 376e7ef07cfe3c3972171a768cd948675510a517 Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Wed, 20 May 2026 16:39:06 +0200 Subject: [PATCH] util: Expose IOErrorIsPermanent in sock header Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com> --- src/util/sock.cpp | 5 ----- src/util/sock.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/sock.cpp b/src/util/sock.cpp index 8e0c0f4741b..db3f5fc9eb9 100644 --- a/src/util/sock.cpp +++ b/src/util/sock.cpp @@ -26,11 +26,6 @@ #include #endif -static inline bool IOErrorIsPermanent(int err) -{ - return err != WSAEAGAIN && err != WSAEINTR && err != WSAEWOULDBLOCK && err != WSAEINPROGRESS; -} - Sock::Sock(SOCKET s) : m_socket(s) {} Sock::Sock(Sock&& other) diff --git a/src/util/sock.h b/src/util/sock.h index e20b31e1816..50c1ab00b41 100644 --- a/src/util/sock.h +++ b/src/util/sock.h @@ -23,6 +23,11 @@ class CThreadInterrupt; */ static constexpr auto MAX_WAIT_FOR_IO = 1s; +inline bool IOErrorIsPermanent(int err) +{ + return err != WSAEAGAIN && err != WSAEINTR && err != WSAEWOULDBLOCK && err != WSAEINPROGRESS; +} + /** * RAII helper class that manages a socket and closes it automatically when it goes out of scope. */