only publish when we have at least 3 established paths

pull/20/head
Jeff 6 years ago
parent e5208b65cc
commit 9a60c08810

@ -572,6 +572,8 @@ namespace llarp
bool bool
Endpoint::ShouldPublishDescriptors(llarp_time_t now) const Endpoint::ShouldPublishDescriptors(llarp_time_t now) const
{ {
if(NumInStatus(llarp::path::eEstablished) < 3)
return false;
if(m_IntroSet.HasExpiredIntros(now)) if(m_IntroSet.HasExpiredIntros(now))
return now - m_LastPublishAttempt >= INTROSET_PUBLISH_RETRY_INTERVAL; return now - m_LastPublishAttempt >= INTROSET_PUBLISH_RETRY_INTERVAL;
return now - m_LastPublishAttempt >= INTROSET_PUBLISH_INTERVAL; return now - m_LastPublishAttempt >= INTROSET_PUBLISH_INTERVAL;

Loading…
Cancel
Save