diff options
author | brunoerg <brunoely.gc@gmail.com> | 2024-04-08 10:50:55 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2024-06-12 16:40:42 -0300 |
commit | 7d3662fbe35032178c5a5e27e73c592268f6e41b (patch) | |
tree | 166fac16fb098faea2d94e3ef958401cee31a98c | |
parent | 3d3a83fab2bcc5750e5c5854d121e943922fefd8 (diff) |
i2p: fix log when an interruption happens during `Accept`
Before, interruption was printed as an error. Also,
it did not log the reason when an interruption happened,
e.g. "Error accepting:".
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
-rw-r--r-- | src/i2p.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/i2p.cpp b/src/i2p.cpp index d30fa7258e..d85dc30003 100644 --- a/src/i2p.cpp +++ b/src/i2p.cpp @@ -202,7 +202,11 @@ bool Session::Accept(Connection& conn) return true; } - LogPrintLevel(BCLog::I2P, BCLog::Level::Debug, "Error accepting%s: %s\n", disconnect ? " (will close the session)" : "", errmsg); + if (*m_interrupt) { + LogPrintLevel(BCLog::I2P, BCLog::Level::Debug, "Accept was interrupted\n"); + } else { + LogPrintLevel(BCLog::I2P, BCLog::Level::Debug, "Error accepting%s: %s\n", disconnect ? " (will close the session)" : "", errmsg); + } if (disconnect) { LOCK(m_mutex); Disconnect(); |