connect to routers even if we are decomissioned

This commit is contained in:
Jeff 2022-04-28 18:28:55 -04:00 committed by Jeff
parent d9a8710ccf
commit 706e34c082
No known key found for this signature in database
GPG Key ID: 025C02EE3A092F2D
1 changed files with 9 additions and 9 deletions

View File

@ -982,17 +982,17 @@ namespace llarp
connectToNum = strictConnect;
}
if (decom)
// complain about being deregistered
if (decom and now >= m_NextDecommissionWarn)
{
// complain about being deregistered
if (now >= m_NextDecommissionWarn)
{
constexpr auto DecommissionWarnInterval = 30s;
LogError("We are running as a service node but we seem to be decommissioned");
m_NextDecommissionWarn = now + DecommissionWarnInterval;
}
constexpr auto DecommissionWarnInterval = 30s;
LogError("We are running as a service node but we seem to be decommissioned");
m_NextDecommissionWarn = now + DecommissionWarnInterval;
}
else if (connected < connectToNum)
// if we need more sessions to routers and we are not a service node kicked from the network
// we shall connect out to others
if (connected < connectToNum and not(isSvcNode and not SessionToRouterAllowed(pubkey())))
{
size_t dlt = connectToNum - connected;
LogDebug("connecting to ", dlt, " random routers to keep alive");