Fix calculation of number of bound sockets to use
Github-Pull: #9253
Rebased-From: 9e1f46821d
This commit is contained in:
parent
396c405e7b
commit
28d0f224fd
|
@ -854,7 +854,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure enough file descriptors are available
|
// Make sure enough file descriptors are available
|
||||||
int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1);
|
int nBind = std::max(
|
||||||
|
(mapMultiArgs.count("-bind") ? mapMultiArgs.at("-bind").size() : 0) +
|
||||||
|
(mapMultiArgs.count("-whitebind") ? mapMultiArgs.at("-whitebind").size() : 0), size_t(1));
|
||||||
int nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS);
|
int nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS);
|
||||||
nMaxConnections = std::max(nUserMaxConnections, 0);
|
nMaxConnections = std::max(nUserMaxConnections, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue