|
|
@ -811,23 +811,23 @@ static void AcceptConnection(const ListenSocket& hListenSocket) { |
|
|
|
return; |
|
|
|
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); |
|
|
|
CloseSocket(hSocket); |
|
|
|
return; |
|
|
|
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); |
|
|
|
CloseSocket(hSocket); |
|
|
|
return; |
|
|
|
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); |
|
|
|
CloseSocket(hSocket); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|