diff options
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp index 6214c754c3..248aedfa12 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -811,23 +811,23 @@ static void AcceptConnection(const ListenSocket& hListenSocket) { return; } - if (nInbound >= nMaxInbound) + if (CNode::IsBanned(addr) && !whitelisted) { - LogPrint("net", "connection from %s dropped (full)\n", addr.ToString()); + LogPrintf("connection from %s dropped (banned)\n", addr.ToString()); CloseSocket(hSocket); return; } - if (!whitelisted && (nInbound >= (nMaxInbound - nWhiteConnections))) + if (nInbound >= nMaxInbound) { - LogPrint("net", "connection from %s dropped (non-whitelisted)\n", addr.ToString()); + LogPrint("net", "connection from %s dropped (full)\n", addr.ToString()); CloseSocket(hSocket); return; } - if (CNode::IsBanned(addr) && !whitelisted) + if (!whitelisted && (nInbound >= (nMaxInbound - nWhiteConnections))) { - LogPrintf("connection from %s dropped (banned)\n", addr.ToString()); + LogPrint("net", "connection from %s dropped (non-whitelisted)\n", addr.ToString()); CloseSocket(hSocket); return; } |