mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-14 00:27:57 +00:00
delete all streams upon deletion of a local destination
This commit is contained in:
parent
393d4bc231
commit
ec624c89b2
@ -505,6 +505,7 @@ namespace util
|
||||
{
|
||||
m_Stream->Close ();
|
||||
DeleteStream (m_Stream);
|
||||
m_Stream = nullptr;
|
||||
}
|
||||
m_Socket->close ();
|
||||
delete this;
|
||||
|
4
SAM.cpp
4
SAM.cpp
@ -18,7 +18,7 @@ namespace stream
|
||||
if (m_Stream)
|
||||
{
|
||||
m_Stream->Close ();
|
||||
delete m_Stream;
|
||||
DeleteStream (m_Stream);
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ namespace stream
|
||||
if (m_Stream)
|
||||
{
|
||||
m_Stream->Close ();
|
||||
delete m_Stream;
|
||||
DeleteStream (m_Stream);
|
||||
m_Stream = nullptr;
|
||||
}
|
||||
delete this;
|
||||
|
@ -38,6 +38,7 @@ namespace stream
|
||||
|
||||
Stream::~Stream ()
|
||||
{
|
||||
Close ();
|
||||
m_ReceiveTimer.cancel ();
|
||||
m_ResendTimer.cancel ();
|
||||
while (!m_ReceiveQueue.empty ())
|
||||
@ -561,7 +562,8 @@ namespace stream
|
||||
|
||||
StreamingDestination::~StreamingDestination ()
|
||||
{
|
||||
// TODO: delete streams
|
||||
for (auto it: m_Streams)
|
||||
delete it.second;
|
||||
if (m_Pool)
|
||||
i2p::tunnel::tunnels.DeleteTunnelPool (m_Pool);
|
||||
delete m_LeaseSet;
|
||||
|
Loading…
Reference in New Issue
Block a user