From c9c98345b653210415c07c39d42608d7ad5022cf Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Mon, 10 Mar 2025 17:18:59 -0400 Subject: [PATCH] refactor forced late ACL updates, the old way was causing erroneous multiple ACL messages to appear in the log giving the impression that the FNE was updating ACL's rapidly; --- src/fne/network/FNENetwork.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/fne/network/FNENetwork.cpp b/src/fne/network/FNENetwork.cpp index e6a7e011..00c743e7 100644 --- a/src/fne/network/FNENetwork.cpp +++ b/src/fne/network/FNENetwork.cpp @@ -961,10 +961,14 @@ void* FNENetwork::threadedNetworkRx(void* arg) // does this peer need an ACL update? uint64_t dt = connection->lastACLUpdate() + (network->m_updateLookupTime * 1000); if (dt < now) { - LogInfoEx(LOG_NET, "PEER %u (%s) updating ACL list, dt = %u, now = %u", peerId, connection->identity().c_str(), - dt, now); - dt = connection->lastACLUpdate() + ((network->m_updateLookupTime * 1000) * 2); - if (connection->streamCount() <= 1 || (dt < now)) { + if (connection->streamCount() <= 1 || ((dt * 2) < now)) { + if ((dt * 2) < now) + LogInfoEx(LOG_NET, "PEER %u (%s) late updating ACL list, dt = %u, ddt = %u, now = %u", peerId, connection->identity().c_str(), + dt, dt * 2, now); + else + LogInfoEx(LOG_NET, "PEER %u (%s) updating ACL list, dt = %u, now = %u", peerId, connection->identity().c_str(), + dt, now); + network->peerACLUpdate(peerId); connection->lastACLUpdate(now); }