move RunnableService away from LeaseSetDestination

This commit is contained in:
orignal 2020-02-02 18:58:58 -05:00
parent 49810eb153
commit 2d154ee640
7 changed files with 87 additions and 111 deletions

View file

@ -45,29 +45,19 @@ namespace client
}
bool MatchedTunnelDestination::Start()
void MatchedTunnelDestination::Start()
{
if(ClientDestination::Start())
{
m_ResolveTimer = std::make_shared<boost::asio::deadline_timer>(GetService());
GetTunnelPool()->SetCustomPeerSelector(this);
ResolveCurrentLeaseSet();
return true;
}
else
return false;
ClientDestination::Start();
m_ResolveTimer = std::make_shared<boost::asio::deadline_timer>(GetService());
GetTunnelPool()->SetCustomPeerSelector(this);
ResolveCurrentLeaseSet();
}
bool MatchedTunnelDestination::Stop()
void MatchedTunnelDestination::Stop()
{
if(ClientDestination::Stop())
{
if(m_ResolveTimer)
m_ResolveTimer->cancel();
return true;
}
else
return false;
ClientDestination::Stop();
if(m_ResolveTimer)
m_ResolveTimer->cancel();
}