diff options
| author | Pieter Wuille <[email protected]> | 2016-12-01 13:03:56 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-12-01 13:07:08 -0800 |
| commit | c1a52276848d8caa9a9789dff176408c1aa6b1ed (patch) | |
| tree | 6ba6a667f3b074158242b114eff1ecef2808dfdf /src/init.cpp | |
| parent | Merge #9230: Fix some benign races in timestamp logging (diff) | |
| parent | Fix calculation of number of bound sockets to use (diff) | |
| download | discoin-c1a52276848d8caa9a9789dff176408c1aa6b1ed.tar.xz discoin-c1a52276848d8caa9a9789dff176408c1aa6b1ed.zip | |
Merge #9253: Fix calculation of number of bound sockets to use
9e1f468 Fix calculation of number of bound sockets to use (Matt Corallo)
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); |