From d52875aa8fa6d98ad56308fe8ba212bbee980573 Mon Sep 17 00:00:00 2001 From: Istvan Szabo Date: Fri, 28 May 2021 16:06:27 +0100 Subject: [PATCH] Added logs to intentional disconnects --- src/main/java/org/qortal/network/Network.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/qortal/network/Network.java b/src/main/java/org/qortal/network/Network.java index 9114c869..772a96d5 100644 --- a/src/main/java/org/qortal/network/Network.java +++ b/src/main/java/org/qortal/network/Network.java @@ -526,8 +526,8 @@ public class Network { List fixedNetwork = Settings.getInstance().getFixedNetwork(); if (fixedNetwork != null && !fixedNetwork.isEmpty() && ipNotInFixedList(address, fixedNetwork)) { try { - socketChannel.close(); LOGGER.debug("Connection discarded from peer {} as not in the fixed network list", address); + socketChannel.close(); } catch (IOException e) { // IGNORE } @@ -547,7 +547,7 @@ public class Network { synchronized (this.connectedPeers) { if (connectedPeers.size() >= maxPeers) { // We have enough peers - LOGGER.debug("Connection discarded from peer {}", address); + LOGGER.debug("Connection discarded from peer {} because the server is full", address); socketChannel.close(); return; } @@ -560,6 +560,7 @@ public class Network { } catch (IOException e) { if (socketChannel.isOpen()) { try { + LOGGER.debug("Connection failed from peer {} while connecting/closing", address); socketChannel.close(); } catch (IOException ce) { // Couldn't close?