Browse Source

Merge #9253: Fix calculation of number of bound sockets to use

9e1f468 Fix calculation of number of bound sockets to use (Matt Corallo)
0.14
Pieter Wuille 8 years ago
parent
commit
c1a5227684
No known key found for this signature in database
GPG Key ID: DBA1A67379A1A931
  1. 4
      src/init.cpp

4
src/init.cpp

@ -859,7 +859,9 @@ bool AppInitParameterInteraction() @@ -859,7 +859,9 @@ bool AppInitParameterInteraction()
}
// 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));
nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS);
nMaxConnections = std::max(nUserMaxConnections, 0);

Loading…
Cancel
Save