Rev3171, Allow 127.0.0.1 peers for testing reasons

This commit is contained in:
shortcutme 2017-12-15 12:28:48 +01:00
parent 6628b07bba
commit b5452bce6b
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.6.0"
self.rev = 3170
self.rev = 3171
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"

View File

@ -766,7 +766,7 @@ class Site(object):
# Add or update a peer to site
# return_peer: Always return the peer even if it was already present
def addPeer(self, ip, port, return_peer=False, connection=None):
if not ip or ip in ("127.0.0.1", "0.0.0.0"):
if not ip or ip == "0.0.0.0":
return False
key = "%s:%s" % (ip, port)
if key in self.peers: # Already has this ip