Skip to content

Commit

Permalink
C4Network2IO: Log socket connection errors as warning instead of erro…
Browse files Browse the repository at this point in the history
…r to alleviate error spam with no to low user impact
  • Loading branch information
Fulgen301 committed Nov 19, 2024
1 parent 4d7dd18 commit 846fa8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/C4Network2IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 846fa8e

Please sign in to comment.