mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-08 22:57:52 +00:00
Merge pull request #529 from majestrate/fix-long-uptime-memleak
close ntcp sessions to prevent memory leaks
This commit is contained in:
commit
74d9f89c09
@ -457,7 +457,12 @@ namespace transport
|
|||||||
m_SSUServer->DeleteSession (ssuSession);
|
m_SSUServer->DeleteSession (ssuSession);
|
||||||
LogPrint (eLogDebug, "Transports: SSU session closed");
|
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 ()
|
void Transports::DetectExternalIP ()
|
||||||
|
Loading…
Reference in New Issue
Block a user