clean-up datagram session toghters with leasesets and tags

This commit is contained in:
orignal 2016-09-08 10:16:42 -04:00
parent db71673722
commit bee407ea34
4 changed files with 28 additions and 35 deletions

View file

@ -641,6 +641,7 @@ namespace client
{
CleanupExpiredTags ();
CleanupRemoteLeaseSets ();
CleanupDestination ();
m_CleanupTimer.expires_from_now (boost::posix_time::minutes (DESTINATION_CLEANUP_TIMEOUT));
m_CleanupTimer.async_wait (std::bind (&LeaseSetDestination::HandleCleanupTimer,
shared_from_this (), std::placeholders::_1));
@ -892,5 +893,11 @@ namespace client
Sign (leaseSet->GetBuffer (), leaseSet->GetBufferLen () - leaseSet->GetSignatureLen (), leaseSet->GetSignature ()); // TODO
SetLeaseSet (leaseSet);
}
void ClientDestination::CleanupDestination ()
{
if (m_DatagramDestination) m_DatagramDestination->CleanUp ();
}
}
}