aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2016-10-24 21:38:20 +0200
committerMarcoFalke <[email protected]>2016-10-24 22:12:48 +0200
commitfa1c3c2eb0a1853ed0e0662fc2bdbca51e05ccf5 (patch)
tree1a56a6f182806486569700cd935904f9004365dd /src/net.cpp
parentMerge #8995: Add missing cs_main lock to ::GETBLOCKTXN processing (diff)
downloaddiscoin-fa1c3c2eb0a1853ed0e0662fc2bdbca51e05ccf5.tar.xz
discoin-fa1c3c2eb0a1853ed0e0662fc2bdbca51e05ccf5.zip
[net] Remove assert(nMaxInbound > 0)
nMaxInbound might very well be 0 or -1, if the user prefers to keep a small number of maxconnections. Note: nMaxInbound of -1 means that the user set maxconnections to 8 or less, but we still want to keep an additional slot for the feeler connection.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 1bca168d1..83a85dfbd 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -970,7 +970,6 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
CAddress addr;
int nInbound = 0;
int nMaxInbound = nMaxConnections - (nMaxOutbound + nMaxFeeler);
- assert(nMaxInbound > 0);
if (hSocket != INVALID_SOCKET)
if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr))