Rev3171, Allow 127.0.0.1 peers for testing reasons
This commit is contained in:
parent
6628b07bba
commit
b5452bce6b
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.6.0"
|
self.version = "0.6.0"
|
||||||
self.rev = 3170
|
self.rev = 3171
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.config_file = "zeronet.conf"
|
self.config_file = "zeronet.conf"
|
||||||
|
|
|
@ -766,7 +766,7 @@ class Site(object):
|
||||||
# Add or update a peer to site
|
# Add or update a peer to site
|
||||||
# return_peer: Always return the peer even if it was already present
|
# return_peer: Always return the peer even if it was already present
|
||||||
def addPeer(self, ip, port, return_peer=False, connection=None):
|
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
|
return False
|
||||||
key = "%s:%s" % (ip, port)
|
key = "%s:%s" % (ip, port)
|
||||||
if key in self.peers: # Already has this ip
|
if key in self.peers: # Already has this ip
|
||||||
|
|
Loading…
Reference in a new issue