From 306d54e285ecbb6606c17536d0a7d90ad26c4a05 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 17 Oct 2022 08:33:50 -0400 Subject: [PATCH] when running as a client squelch warnings about snode status and make sure we connect out --- llarp/router/router.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llarp/router/router.cpp b/llarp/router/router.cpp index b272e36e8..9c1f1c1e6 100644 --- a/llarp/router/router.cpp +++ b/llarp/router/router.cpp @@ -1063,7 +1063,7 @@ namespace llarp connectToNum = strictConnect; } - if (now >= m_NextDecommissionWarn) + if (isSvcNode and now >= m_NextDecommissionWarn) { constexpr auto DecommissionWarnInterval = 5min; if (auto registered = LooksRegistered(), funded = LooksFunded(); @@ -1078,7 +1078,7 @@ namespace llarp : "not fully staked"); m_NextDecommissionWarn = now + DecommissionWarnInterval; } - else if (isSvcNode and TooFewPeers()) + else if (TooFewPeers()) { log::error( logcat, @@ -1088,9 +1088,9 @@ namespace llarp } } - // if we need more sessions to routers and we are not a service node kicked from the network + // if we need more sessions to routers and we are not a service node kicked from the network or we are a client // we shall connect out to others - if (connected < connectToNum and LooksFunded()) + if (connected < connectToNum and (LooksFunded() or not isSvcNode)) { size_t dlt = connectToNum - connected; LogDebug("connecting to ", dlt, " random routers to keep alive");