From c9b19093a1fc89cffeeb24e2cabf3204de2dc517 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 24 Oct 2016 21:38:20 +0200 Subject: [PATCH] [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. Github-Pull: #2682 Rebased-From: 72dfebb46b2e8e926cb502823623539eb4399f5a --- src/net.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index df4629b972704..dfe41286589f6 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1037,7 +1037,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))