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; }