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
1 changed files with 1 additions and 0 deletions

View File

@ -346,6 +346,7 @@ class Connection(object):
if handshake.get("peer_id") == self.server.peer_id:
self.close("Same peer id, can't connect to myself")
self.server.peer_blacklist.append((handshake["target_ip"], handshake["fileserver_port"]))
return False
self.handshake = handshake