Browse Source

fixed memory leak

pull/158/head
orignal 10 years ago
parent
commit
a80e4ef0ea
  1. 2
      HTTPServer.cpp
  2. 5
      SSUData.cpp
  3. 3
      SSUData.h
  4. 1
      SSUSession.cpp

2
HTTPServer.cpp

@ -743,6 +743,8 @@ namespace util @@ -743,6 +743,8 @@ namespace util
s << endpoint.address ().to_string () << ":" << endpoint.port ();
if (!outgoing) s << "-->";
s << " [" << it.second->GetNumSentBytes () << ":" << it.second->GetNumReceivedBytes () << "]";
if (it.second->GetRelayTag ())
s << " [itag:" << it.second->GetRelayTag () << "]";
s << "<br>";
s << std::endl;
}

5
SSUData.cpp

@ -28,6 +28,11 @@ namespace transport @@ -28,6 +28,11 @@ namespace transport
delete it.second;
}
void SSUData::Stop ()
{
m_ResendTimer.cancel ();
}
void SSUData::AdjustPacketSize (const i2p::data::RouterInfo& remoteRouter)
{
auto ssuAddress = remoteRouter.GetSSUAddress ();

3
SSUData.h

@ -78,7 +78,8 @@ namespace transport @@ -78,7 +78,8 @@ namespace transport
SSUData (SSUSession& session);
~SSUData ();
void Stop ();
void ProcessMessage (uint8_t * buf, size_t len);
void Send (i2p::I2NPMessage * msg);

1
SSUSession.cpp

@ -763,6 +763,7 @@ namespace transport @@ -763,6 +763,7 @@ namespace transport
m_State = eSessionStateClosed;
SendSesionDestroyed ();
transports.PeerDisconnected (shared_from_this ());
m_Data.Stop ();
m_Timer.cancel ();
}

Loading…
Cancel
Save