mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
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>
This commit is contained in:
parent
3d3a83fab2
commit
7d3662fbe3
1 changed files with 5 additions and 1 deletions
|
@ -202,7 +202,11 @@ bool Session::Accept(Connection& conn)
|
||||||
return true;
|
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) {
|
if (disconnect) {
|
||||||
LOCK(m_mutex);
|
LOCK(m_mutex);
|
||||||
Disconnect();
|
Disconnect();
|
||||||
|
|
Loading…
Add table
Reference in a new issue