Skip to content

Commit c9b1909

Browse files
MarcoFalkefurszy
authored andcommitted
[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: 72dfebb
1 parent d629df0 commit c9b1909

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
@@ -1037,7 +1037,6 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
10371037
CAddress addr;
10381038
int nInbound = 0;
10391039
int nMaxInbound = nMaxConnections - (nMaxOutbound + nMaxFeeler);
1040-
assert(nMaxInbound > 0);
10411040

10421041
if (hSocket != INVALID_SOCKET)
10431042
if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr))

0 commit comments

Comments
 (0)