TrackerShare: ignore the udp:// protocol, when UDP is known to be disabled by the config
This commit is contained in:
parent
eb6d0c9644
commit
d57deaa8e4
1 changed files with 5 additions and 0 deletions
|
@ -75,6 +75,9 @@ class TrackerStorage(object):
|
||||||
if not self.isTrackerAddressValid(address):
|
if not self.isTrackerAddressValid(address):
|
||||||
del trackers[address]
|
del trackers[address]
|
||||||
|
|
||||||
|
def isUdpEnabled(self):
|
||||||
|
return not (config.disable_udp or config.trackers_proxy != "disable")
|
||||||
|
|
||||||
def getNormalizedTrackerProtocol(self, tracker_address):
|
def getNormalizedTrackerProtocol(self, tracker_address):
|
||||||
if not self.site_announcer:
|
if not self.site_announcer:
|
||||||
return None
|
return None
|
||||||
|
@ -111,6 +114,8 @@ class TrackerStorage(object):
|
||||||
protocol = self.getNormalizedTrackerProtocol(tracker_address)
|
protocol = self.getNormalizedTrackerProtocol(tracker_address)
|
||||||
if not protocol:
|
if not protocol:
|
||||||
continue
|
continue
|
||||||
|
if protocol == "udp" and not self.isUdpEnabled():
|
||||||
|
continue
|
||||||
protocols.add(protocol)
|
protocols.add(protocol)
|
||||||
|
|
||||||
protocols = list(protocols)
|
protocols = list(protocols)
|
||||||
|
|
Loading…
Reference in a new issue