From f791f9ae5853ca23b658315c2d7f29cb919ca205 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Thu, 29 May 2025 08:57:38 -0400 Subject: [PATCH] BUGFIX: if the host retried the login attempt and set WAITING_LOGIN state, it was possible for the connection to become stuck in an endless limbo state resulting in no connection, resolve this by evaluating the retry interval while in WAITING_LOGIN (login attempts to the FNE should not take over 10 seconds to complete!); --- src/common/network/Network.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/common/network/Network.cpp b/src/common/network/Network.cpp index e3b155e7..1770b3d4 100644 --- a/src/common/network/Network.cpp +++ b/src/common/network/Network.cpp @@ -194,6 +194,18 @@ void Network::clock(uint32_t ms) return; } + // if we are waiting for a login response, check the timeout + if (m_status == NET_STAT_WAITING_LOGIN) { + m_retryTimer.clock(ms); + if (m_retryTimer.isRunning() && m_retryTimer.hasExpired()) { + LogError(LOG_NET, "PEER %u login attempt to the master has timed out, retrying connection", m_peerId); + + close(); + open(); + return; + } + } + // if we aren't enabled -- bail if (!m_enabled) { return;