Blacklist myself on peer id match
This commit is contained in:
parent
ba12489c34
commit
f1396b65b9
1 changed files with 1 additions and 0 deletions
|
@ -346,6 +346,7 @@ class Connection(object):
|
||||||
|
|
||||||
if handshake.get("peer_id") == self.server.peer_id:
|
if handshake.get("peer_id") == self.server.peer_id:
|
||||||
self.close("Same peer id, can't connect to myself")
|
self.close("Same peer id, can't connect to myself")
|
||||||
|
self.server.peer_blacklist.append((handshake["target_ip"], handshake["fileserver_port"]))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.handshake = handshake
|
self.handshake = handshake
|
||||||
|
|
Loading…
Reference in a new issue