diff options
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 6114bbaa2d..a46742e56a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1677,7 +1677,14 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) if (gArgs.IsArgSet("-seednode")) { connOptions.vSeedNodes = gArgs.GetArgs("-seednode"); } - + // Initiate outbound connections unless connect=0 + connOptions.m_use_addrman_outgoing = !gArgs.IsArgSet("-connect"); + if (!connOptions.m_use_addrman_outgoing) { + const auto connect = gArgs.GetArgs("-connect"); + if (connect.size() != 1 || connect[0] != "0") { + connOptions.m_specified_outgoing = connect; + } + } if (!connman.Start(scheduler, connOptions)) { return false; } |