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

@ -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