mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
break circular reference
This commit is contained in:
parent
c6ddae2d8e
commit
0e14b54b6d
@ -700,13 +700,20 @@ namespace client
|
|||||||
{
|
{
|
||||||
m_ReadyChecker.cancel();
|
m_ReadyChecker.cancel();
|
||||||
m_StreamingDestination->Stop ();
|
m_StreamingDestination->Stop ();
|
||||||
|
m_StreamingDestination->SetOwner (nullptr);
|
||||||
m_StreamingDestination = nullptr;
|
m_StreamingDestination = nullptr;
|
||||||
for (auto& it: m_StreamingDestinationsByPorts)
|
for (auto& it: m_StreamingDestinationsByPorts)
|
||||||
|
{
|
||||||
it.second->Stop ();
|
it.second->Stop ();
|
||||||
if(m_DatagramDestination)
|
it.second->SetOwner (nullptr);
|
||||||
delete m_DatagramDestination;
|
}
|
||||||
m_DatagramDestination = nullptr;
|
m_StreamingDestinationsByPorts.clear ();
|
||||||
return true;
|
if (m_DatagramDestination)
|
||||||
|
{
|
||||||
|
delete m_DatagramDestination;
|
||||||
|
m_DatagramDestination = nullptr;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -224,6 +224,7 @@ namespace stream
|
|||||||
void ResetAcceptor ();
|
void ResetAcceptor ();
|
||||||
bool IsAcceptorSet () const { return m_Acceptor != nullptr; };
|
bool IsAcceptorSet () const { return m_Acceptor != nullptr; };
|
||||||
std::shared_ptr<i2p::client::ClientDestination> GetOwner () const { return m_Owner; };
|
std::shared_ptr<i2p::client::ClientDestination> GetOwner () const { return m_Owner; };
|
||||||
|
void SetOwner (std::shared_ptr<i2p::client::ClientDestination> owner) { m_Owner = owner; };
|
||||||
uint16_t GetLocalPort () const { return m_LocalPort; };
|
uint16_t GetLocalPort () const { return m_LocalPort; };
|
||||||
|
|
||||||
void HandleDataMessagePayload (const uint8_t * buf, size_t len);
|
void HandleDataMessagePayload (const uint8_t * buf, size_t len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user