Browse Source

replace by new incoming session

pull/1502/head
orignal 5 years ago
parent
commit
b7c206c44b
  1. 4
      libi2pd/NTCP2.cpp

4
libi2pd/NTCP2.cpp

@ -1262,6 +1262,10 @@ namespace transport
if (it != m_NTCP2Sessions.end ()) if (it != m_NTCP2Sessions.end ())
{ {
LogPrint (eLogWarning, "NTCP2: session to ", ident.ToBase64 (), " already exists"); LogPrint (eLogWarning, "NTCP2: session to ", ident.ToBase64 (), " already exists");
if (incoming)
// replace by new session
it->second->Terminate ();
else
return false; return false;
} }
m_NTCP2Sessions.insert (std::make_pair (ident, session)); m_NTCP2Sessions.insert (std::make_pair (ident, session));

Loading…
Cancel
Save