mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 11:04:00 +01:00
replace by new incoming session
This commit is contained in:
parent
49c1e47736
commit
b7c206c44b
|
@ -1262,7 +1262,11 @@ 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");
|
||||||
return false;
|
if (incoming)
|
||||||
|
// replace by new session
|
||||||
|
it->second->Terminate ();
|
||||||
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
m_NTCP2Sessions.insert (std::make_pair (ident, session));
|
m_NTCP2Sessions.insert (std::make_pair (ident, session));
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue