From 846fa8ea37688133c374bb427e8bc2890a88709b Mon Sep 17 00:00:00 2001 From: George Tokmaji Date: Tue, 19 Nov 2024 08:25:11 +0100 Subject: [PATCH] C4Network2IO: Log socket connection errors as warning instead of error to alleviate error spam with no to low user impact --- src/C4Network2IO.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/C4Network2IO.cpp b/src/C4Network2IO.cpp index 0978f5da..1fd5fd1c 100644 --- a/src/C4Network2IO.cpp +++ b/src/C4Network2IO.cpp @@ -250,8 +250,9 @@ bool C4Network2IO::ConnectWithSocket(const C4NetIO::addr_t &addr, C4Network2IOPr // connect if (!pConn->Connect()) { - // show error - logger->error("could not connect to {} using {}: {}", addr.ToString(), + // log error as warning - it's not of the same severity as other Network2IO errors + // and may happen rather frequently with no impact to the player + logger->warn("could not connect to {} using {}: {}", addr.ToString(), getNetIOName(pNetIO), pNetIO->GetError() ? pNetIO->GetError() : ""); pNetIO->ResetError(); // remove class