Replace deadline_timer by steady_timer

Prevent deprecation warnings when building.
This commit is contained in:
Benson Muite
2026-03-06 10:55:47 +03:00
parent a3cafd3cfd
commit 73623a4793
33 changed files with 95 additions and 95 deletions
+2 -2
View File
@@ -123,7 +123,7 @@ namespace client
// start UDP cleanup
if (!m_ServerForwards.empty ())
{
m_CleanupUDPTimer.reset (new boost::asio::deadline_timer(m_SharedLocalDestination->GetService ()));
m_CleanupUDPTimer.reset (new boost::asio::steady_timer(m_SharedLocalDestination->GetService ()));
ScheduleCleanupUDP();
}
}
@@ -1043,7 +1043,7 @@ namespace client
if (m_CleanupUDPTimer)
{
// schedule cleanup in 17 seconds
m_CleanupUDPTimer->expires_from_now (boost::posix_time::seconds (17));
m_CleanupUDPTimer->expires_after (std::chrono::seconds (17));
m_CleanupUDPTimer->async_wait(std::bind(&ClientContext::CleanupUDP, this, std::placeholders::_1));
}
}