diff options
| author | Matt Corallo <[email protected]> | 2016-11-29 17:49:08 -0800 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2016-11-30 18:56:08 -0800 |
| commit | 9e1f46821d5bb69e2cbf25738eefa7c6cb99c838 (patch) | |
| tree | f5c204e6cc488fc6a90836ce04a91a0d44eaff46 /src/init.cpp | |
| parent | Merge #9226: Remove fNetworkNode and pnodeLocalHost. (diff) | |
| download | discoin-9e1f46821d5bb69e2cbf25738eefa7c6cb99c838.tar.xz discoin-9e1f46821d5bb69e2cbf25738eefa7c6cb99c838.zip | |
Fix calculation of number of bound sockets to use
Diffstat (limited to 'src/init.cpp')
| -rw-r--r-- | src/init.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 63ec74481..377d196f2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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); |