diff --git a/src/Connection/Connection.py b/src/Connection/Connection.py index 2e298578..5a051a54 100644 --- a/src/Connection/Connection.py +++ b/src/Connection/Connection.py @@ -342,6 +342,9 @@ class Connection(object): elif self.ip.endswith(".onion"): handshake["onion"] = self.server.tor_manager.getOnion("global") + if self.is_tracker_connection: + handshake["tracker_connection"] = True + if config.debug_socket: self.log("My Handshake: %s" % handshake) @@ -351,7 +354,7 @@ class Connection(object): if config.debug_socket: self.log("Remote Handshake: %s" % handshake) - if handshake.get("peer_id") == self.server.peer_id: + if handshake.get("peer_id") == self.server.peer_id and not handshake.get("tracker_connection") and not self.is_tracker_connection: self.close("Same peer id, can't connect to myself") self.server.peer_blacklist.append((handshake["target_ip"], handshake["fileserver_port"])) return False