Blacklist myself on peer id match

This commit is contained in:
shortcutme 2018-03-14 22:26:08 +01:00
parent ba12489c34
commit f1396b65b9
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

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