mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
fixed memory leak
This commit is contained in:
parent
ab0bd908ec
commit
a80e4ef0ea
@ -743,6 +743,8 @@ namespace util
|
|||||||
s << endpoint.address ().to_string () << ":" << endpoint.port ();
|
s << endpoint.address ().to_string () << ":" << endpoint.port ();
|
||||||
if (!outgoing) s << "-->";
|
if (!outgoing) s << "-->";
|
||||||
s << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]";
|
s << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]";
|
||||||
|
if (it.second->GetRelayTag ())
|
||||||
|
s << " [itag:" << it.second->GetRelayTag () << "]";
|
||||||
s << "<br>";
|
s << "<br>";
|
||||||
s << std::endl;
|
s << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,11 @@ namespace transport
|
|||||||
delete it.second;
|
delete it.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SSUData::Stop ()
|
||||||
|
{
|
||||||
|
m_ResendTimer.cancel ();
|
||||||
|
}
|
||||||
|
|
||||||
void SSUData::AdjustPacketSize (const i2p::data::RouterInfo& remoteRouter)
|
void SSUData::AdjustPacketSize (const i2p::data::RouterInfo& remoteRouter)
|
||||||
{
|
{
|
||||||
auto ssuAddress = remoteRouter.GetSSUAddress ();
|
auto ssuAddress = remoteRouter.GetSSUAddress ();
|
||||||
|
@ -78,7 +78,8 @@ namespace transport
|
|||||||
|
|
||||||
SSUData (SSUSession& session);
|
SSUData (SSUSession& session);
|
||||||
~SSUData ();
|
~SSUData ();
|
||||||
|
void Stop ();
|
||||||
|
|
||||||
void ProcessMessage (uint8_t * buf, size_t len);
|
void ProcessMessage (uint8_t * buf, size_t len);
|
||||||
void Send (i2p::I2NPMessage * msg);
|
void Send (i2p::I2NPMessage * msg);
|
||||||
|
|
||||||
|
@ -763,6 +763,7 @@ namespace transport
|
|||||||
m_State = eSessionStateClosed;
|
m_State = eSessionStateClosed;
|
||||||
SendSesionDestroyed ();
|
SendSesionDestroyed ();
|
||||||
transports.PeerDisconnected (shared_from_this ());
|
transports.PeerDisconnected (shared_from_this ());
|
||||||
|
m_Data.Stop ();
|
||||||
m_Timer.cancel ();
|
m_Timer.cancel ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user