From b9748c55aac2120bdbcdf9ddbde85ef464230d95 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Mon, 14 Nov 2016 20:20:41 +0100 Subject: [PATCH] Don't connect to self fix - the hidden service don't connect to yourself fix was broken, this fixes the fix --- src/class_outgoingSynSender.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/class_outgoingSynSender.py b/src/class_outgoingSynSender.py index 5bef66c6..bca56b33 100644 --- a/src/class_outgoingSynSender.py +++ b/src/class_outgoingSynSender.py @@ -47,10 +47,11 @@ class outgoingSynSender(threading.Thread, StoppableThread): shared.knownNodesLock.release() if shared.config.get('bitmessagesettings', 'socksproxytype') != 'none': if peer.host.find(".onion") == -1: + priority /= 10 # hidden services have 10x priority over plain net + else: # don't connect to self if peer.host == shared.config.get('bitmessagesettings', 'onionhostname') and peer.port == shared.config.getint("bitmessagesettings", "onionport"): continue - priority /= 10 # hidden services have 10x priority over plain net elif peer.host.find(".onion") != -1: # onion address and so proxy continue if priority <= 0.001: # everyone has at least this much priority