mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-21 16:49:10 +01:00
close stream if delete requested
This commit is contained in:
parent
bc8e4494c4
commit
714d1cc993
1 changed files with 6 additions and 1 deletions
|
@ -1285,7 +1285,12 @@ namespace stream
|
||||||
auto it = m_Streams.find (recvStreamID);
|
auto it = m_Streams.find (recvStreamID);
|
||||||
if (it == m_Streams.end ())
|
if (it == m_Streams.end ())
|
||||||
return false;
|
return false;
|
||||||
DeleteStream (it->second);
|
m_Owner->GetService ().post ([this, s = it->second]()
|
||||||
|
{
|
||||||
|
s->Close (); // try to send FIN
|
||||||
|
s->Terminate (false);
|
||||||
|
DeleteStream (s);
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue