Merge pull request #529 from majestrate/fix-long-uptime-memleak

close ntcp sessions to prevent memory leaks
This commit is contained in:
orignal 2016-06-19 21:00:25 -04:00 committed by GitHub
commit 74d9f89c09

View File

@ -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 ()