Browse Source

close ntcp sessions to prevent memory leaks

pull/529/head
Jeff Becker 9 years ago
parent
commit
184c6ee252
  1. 9
      Transports.cpp

9
Transports.cpp

@ -456,8 +456,13 @@ namespace transport @@ -456,8 +456,13 @@ namespace transport
{
m_SSUServer->DeleteSession (ssuSession);
LogPrint (eLogDebug, "Transports: SSU session closed");
}
// TODO: delete NTCP
}
auto ntcpSession = m_NTCPServer ? m_NTCPServer->FindNTCPSession(router->GetIdentHash()) : nullptr;
if (ntcpSession) // try deleting ntcp session too
{
m_NTCPServer->RemoveNTCPSession(ntcpSession);
LogPrint(eLogDebug, "Transports: NTCP session closed");
}
}
void Transports::DetectExternalIP ()

Loading…
Cancel
Save