Skip to content

Commit fa1c3c2

Browse files
author
MarcoFalke
committed
[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.
1 parent ced22d0 commit fa1c3c2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/net.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,6 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
970970
CAddress addr;
971971
int nInbound = 0;
972972
int nMaxInbound = nMaxConnections - (nMaxOutbound + nMaxFeeler);
973-
assert(nMaxInbound > 0);
974973

975974
if (hSocket != INVALID_SOCKET)
976975
if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr))

0 commit comments

Comments
 (0)