refactor: log UTP_ETIMEDOUT errors to 'trace' messages (#4237)
This commit is contained in:
parent
6b861806a6
commit
342484d14a
|
@ -387,7 +387,15 @@ static void utp_on_state_change(tr_peerIo* const io, int const state)
|
|||
|
||||
static void utp_on_error(tr_peerIo* const io, int const errcode)
|
||||
{
|
||||
tr_logAddDebugIo(io, fmt::format("utp_on_error -- errcode is {}", errcode));
|
||||
if (errcode == UTP_ETIMEDOUT)
|
||||
{
|
||||
// high frequency error: we log as trace
|
||||
tr_logAddTraceIo(io, fmt::format("utp_on_error -- UTP_ETIMEDOUT"));
|
||||
}
|
||||
else
|
||||
{
|
||||
tr_logAddDebugIo(io, fmt::format("utp_on_error -- {}", utp_error_code_names[errcode]));
|
||||
}
|
||||
|
||||
if (io->gotError != nullptr)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue