From 52f195b89fdeb2986e2520ebd192e13be25d2829 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Wed, 8 Sep 2021 20:36:21 +0200 Subject: [PATCH] Tweaked idle peer detection --- src/p2p_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2p_server.cpp b/src/p2p_server.cpp index 969c8cd..c4a5d66 100644 --- a/src/p2p_server.cpp +++ b/src/p2p_server.cpp @@ -175,7 +175,7 @@ void P2PServer::update_peer_connections() for (P2PClient* client = static_cast(m_connectedClientsList->m_next); client != m_connectedClientsList; client = static_cast(client->m_next)) { connected_clients.emplace_back(client->m_addr); - const int timeout = client->m_handshakeComplete ? 300 : 5; + const int timeout = client->m_handshakeComplete ? 300 : 10; if (cur_time >= client->m_lastAlive + timeout) { const uint64_t idle_time = static_cast(cur_time - client->m_lastAlive); LOGWARN(5, "peer " << static_cast(client->m_addrString) << " has been idle for " << idle_time << " seconds, disconnecting");