|
|
|
@ -85,15 +85,21 @@ namespace client
@@ -85,15 +85,21 @@ namespace client
|
|
|
|
|
|
|
|
|
|
void ClientDestination::Start () |
|
|
|
|
{ |
|
|
|
|
if (!m_IsRunning) |
|
|
|
|
{ |
|
|
|
|
m_IsRunning = true; |
|
|
|
|
m_Pool->SetLocalDestination (this); |
|
|
|
|
m_Pool->SetActive (true); |
|
|
|
|
m_IsRunning = true; |
|
|
|
|
m_Thread = new std::thread (std::bind (&ClientDestination::Run, this)); |
|
|
|
|
m_StreamingDestination->Start (); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ClientDestination::Stop () |
|
|
|
|
{ |
|
|
|
|
if (m_IsRunning) |
|
|
|
|
{ |
|
|
|
|
m_IsRunning = false; |
|
|
|
|
m_StreamingDestination->Stop (); |
|
|
|
|
if (m_DatagramDestination) |
|
|
|
|
{ |
|
|
|
@ -106,7 +112,6 @@ namespace client
@@ -106,7 +112,6 @@ namespace client
|
|
|
|
|
m_Pool->SetLocalDestination (nullptr); |
|
|
|
|
i2p::tunnel::tunnels.StopTunnelPool (m_Pool); |
|
|
|
|
} |
|
|
|
|
m_IsRunning = false; |
|
|
|
|
m_Service.stop (); |
|
|
|
|
if (m_Thread) |
|
|
|
|
{ |
|
|
|
@ -115,6 +120,7 @@ namespace client
@@ -115,6 +120,7 @@ namespace client
|
|
|
|
|
m_Thread = 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const i2p::data::LeaseSet * ClientDestination::FindLeaseSet (const i2p::data::IdentHash& ident) |
|
|
|
|
{ |
|
|
|
|