Don't request ipv6 trackers if not supported by the client

This commit is contained in:
shortcutme 2019-01-20 16:27:59 +01:00
parent 06d679d1ca
commit e7de562b93
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -46,6 +46,9 @@ class SiteAnnouncer(object):
if not self.site.connection_server.tor_manager.enabled:
trackers = [tracker for tracker in trackers if ".onion" not in tracker]
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"]
return trackers
def getAnnouncingTrackers(self, mode):