From 3ccaa1499cb38f5df9a378f5fcc7b49061598a75 Mon Sep 17 00:00:00 2001 From: leonchuk Date: Fri, 5 Jul 2024 16:42:49 +0300 Subject: [PATCH] Update 3 ChannelManager.java --- src/main/java/org/tron/p2p/connection/ChannelManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/tron/p2p/connection/ChannelManager.java b/src/main/java/org/tron/p2p/connection/ChannelManager.java index cc7f018..975889d 100644 --- a/src/main/java/org/tron/p2p/connection/ChannelManager.java +++ b/src/main/java/org/tron/p2p/connection/ChannelManager.java @@ -112,7 +112,7 @@ public static synchronized DisconnectCode processPeer(Channel channel) { if (!channel.isActive() && !channel.isTrustPeer()) { - if(!Parameter.p2pConfig.isDiscoverEnable() && channels.size()){ + if(!Parameter.p2pConfig.isDiscoverEnable() && channels.size() > 0){ log.info("Discover off, disconnected with {}", channel); return DisconnectCode.TOO_MANY_PEERS; }