aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2014-11-23 15:12:50 -0800
committerGregory Maxwell <greg@xiph.org>2014-11-23 15:17:11 -0800
commit3c777141349ad82d679a278df0619968af53c23f (patch)
tree33372aadd234c60b63ce9b4fa7c09179990d08bc /src/init.cpp
parentcbf28c6619fe348a258dfd7d08bdbd2392d07511 (diff)
Make -proxy set all network types, avoiding a connect leak.
Previously -proxy was not setting the proxy for IsLimited networks, so if you set your configuration to be onlynet=tor you wouldn't get an IPv4 proxy set. The payment protocol gets its proxy configuration from the IPv4 proxy, and so it would experience a connection leak. This addresses issue #5355 and also clears up a cosmetic bug where getinfo proxy output shows nothing when onlynet=tor is set.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 2d2a05a936..d2d6858618 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -854,10 +854,8 @@ bool AppInit2(boost::thread_group& threadGroup)
if (!addrProxy.IsValid())
return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"]));
- if (!IsLimited(NET_IPV4))
- SetProxy(NET_IPV4, addrProxy);
- if (!IsLimited(NET_IPV6))
- SetProxy(NET_IPV6, addrProxy);
+ SetProxy(NET_IPV4, addrProxy);
+ SetProxy(NET_IPV6, addrProxy);
SetNameProxy(addrProxy);
fProxy = true;
}