Browse Source

close stream if delete requested

pull/1754/head
orignal 3 years ago
parent
commit
714d1cc993
  1. 7
      libi2pd/Streaming.cpp

7
libi2pd/Streaming.cpp

@ -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…
Cancel
Save