Skip announcing to trackers with unsupported address

This commit is contained in:
shortcutme 2020-03-02 17:08:43 +01:00
parent 1fc67a3d71
commit e0bf4dc9ec
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -39,6 +39,8 @@ class SiteAnnouncer(object):
if not self.site.connection_server.tor_manager.enabled: if not self.site.connection_server.tor_manager.enabled:
trackers = [tracker for tracker in trackers if ".onion" not in tracker] trackers = [tracker for tracker in trackers if ".onion" not in tracker]
trackers = [tracker for tracker in trackers if self.getAddressParts(tracker)] # Remove trackers with unknown address
if "ipv6" not in self.site.connection_server.supported_ip_types: if "ipv6" not in self.site.connection_server.supported_ip_types:
trackers = [tracker for tracker in trackers if helper.getIpType(self.getAddressParts(tracker)["ip"]) != "ipv6"] trackers = [tracker for tracker in trackers if helper.getIpType(self.getAddressParts(tracker)["ip"]) != "ipv6"]