Browse Source

replace by new incoming session

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

6
libi2pd/NTCP2.cpp

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

Loading…
Cancel
Save