Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't setup TOR proxy unless TOR proxy address is specified on the co…

…mmand-line, otherwise a segfault occurs.
  • Loading branch information...
commit 6ae30731731bc01d5faac8097db6e4332377dec4 1 parent 2c1cd71
Mark Friedenbach authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 main.cpp
View
10 main.cpp
@@ -349,10 +349,12 @@ int main(int argc, char **argv) {
setbuf(stdout, NULL);
CDnsSeedOpts opts;
opts.ParseCommandLine(argc, argv);
- CService service(opts.tor, 9050);
- if (service.IsValid()) {
- printf("Using Tor proxy at %s\n", service.ToStringIPPort().c_str());
- SetProxy(NET_TOR, service);
+ if (opts.tor) {
+ CService service(opts.tor, 9050);
+ if (service.IsValid()) {
+ printf("Using Tor proxy at %s\n", service.ToStringIPPort().c_str());
+ SetProxy(NET_TOR, service);
+ }
}
bool fDNS = true;
if (!opts.ns) {
Please sign in to comment.
Something went wrong with that request. Please try again.