RNG per destination. Use RNG from tunnels in tunnel pool

This commit is contained in:
orignal
2025-12-11 17:43:14 -05:00
parent d4ec15361f
commit 4f73e9678e
13 changed files with 33 additions and 56 deletions
+2 -2
View File
@@ -585,7 +585,7 @@ namespace client
m_PublishReplyToken = 0;
// schedule verification
m_PublishVerificationTimer.expires_from_now (boost::posix_time::seconds(PUBLISH_VERIFICATION_TIMEOUT +
(m_Pool ? m_Pool->GetRng ()() % PUBLISH_VERIFICATION_TIMEOUT_VARIANCE : 0)));
GetRng ()() % PUBLISH_VERIFICATION_TIMEOUT_VARIANCE));
m_PublishVerificationTimer.async_wait (std::bind (&LeaseSetDestination::HandlePublishVerificationTimer,
shared_from_this (), std::placeholders::_1));
}
@@ -946,7 +946,7 @@ namespace client
CleanupRemoteLeaseSets ();
CleanupDestination ();
m_CleanupTimer.expires_from_now (boost::posix_time::seconds (DESTINATION_CLEANUP_TIMEOUT +
(m_Pool ? m_Pool->GetRng ()() % DESTINATION_CLEANUP_TIMEOUT_VARIANCE : 0)));
GetRng ()() % DESTINATION_CLEANUP_TIMEOUT_VARIANCE));
m_CleanupTimer.async_wait (std::bind (&LeaseSetDestination::HandleCleanupTimer,
shared_from_this (), std::placeholders::_1));
}