close stream if delete requested

This commit is contained in:
orignal 2022-05-08 11:49:11 -04:00
parent bc8e4494c4
commit 714d1cc993

View File

@ -1285,7 +1285,12 @@ namespace stream
auto it = m_Streams.find (recvStreamID);
if (it == m_Streams.end ())
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;
}