close duplicate ntcp sessions

This commit is contained in:
Jeff Becker 2016-08-03 10:40:30 -04:00
parent 070a21a9eb
commit c8f5fb4d03
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B

View File

@ -861,6 +861,7 @@ namespace transport
if (it != m_NTCPSessions.end ())
{
LogPrint (eLogWarning, "NTCP: session to ", ident.ToBase64 (), " already exists");
session->Terminate();
return false;
}
m_NTCPSessions.insert (std::pair<i2p::data::IdentHash, std::shared_ptr<NTCPSession> >(ident, session));