mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
improve transport session logging
This commit is contained in:
parent
38795a41cb
commit
9bac680f2a
2 changed files with 32 additions and 6 deletions
|
@ -114,6 +114,8 @@ namespace transport
|
|||
{
|
||||
if (m_State == eSSU2SessionStateUnknown || m_State == eSSU2SessionStateTokenReceived)
|
||||
{
|
||||
LogPrint(eLogDebug, "SSU2: Connecting to ", GetRemoteEndpoint (),
|
||||
" (", i2p::data::GetIdentHashAbbreviation (GetRemoteIdentity ()->GetIdentHash ()), ")");
|
||||
ScheduleConnectTimer ();
|
||||
auto token = m_Server.FindOutgoingToken (m_RemoteEndpoint);
|
||||
if (token)
|
||||
|
@ -269,7 +271,16 @@ namespace transport
|
|||
m_ReceivedI2NPMsgIDs.clear ();
|
||||
m_Server.RemoveSession (m_SourceConnID);
|
||||
transports.PeerDisconnected (shared_from_this ());
|
||||
LogPrint (eLogDebug, "SSU2: Session terminated");
|
||||
auto remoteIdentity = GetRemoteIdentity ();
|
||||
if (remoteIdentity)
|
||||
{
|
||||
LogPrint (eLogDebug, "SSU2: Session with ", GetRemoteEndpoint (),
|
||||
" (", i2p::data::GetIdentHashAbbreviation (GetRemoteIdentity ()->GetIdentHash ()), ") terminated");
|
||||
}
|
||||
else
|
||||
{
|
||||
LogPrint (eLogDebug, "SSU2: Session with ", GetRemoteEndpoint (), " terminated");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -298,6 +309,8 @@ namespace transport
|
|||
m_OnEstablished ();
|
||||
m_OnEstablished = nullptr;
|
||||
}
|
||||
LogPrint(eLogDebug, "SSU2: Session with ", GetRemoteEndpoint (),
|
||||
" (", i2p::data::GetIdentHashAbbreviation (GetRemoteIdentity ()->GetIdentHash ()), ") established");
|
||||
}
|
||||
|
||||
void SSU2Session::Done ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue