Commit b70cbe3a authored by Matt Traudt's avatar Matt Traudt Committed by Matt Traudt
Browse files

Give HelperRelayList the stream building lock too

parent 181ac3f7
......@@ -280,7 +280,7 @@ def run_speedtest(args, conf):
rd = ResultDump(args, conf, end_event)
rp = RelayPrioritizer(args, conf, rl, rd)
helpers, error_msg = HelperRelayList.from_config(
args, conf, controller=controller)
args, conf, stream_building_lock, controller=controller)
if not helpers:
max_pending_results = conf.getint('scanner', 'measurement_threads')
......@@ -30,7 +30,8 @@ class HelperRelay:
class HelperRelayList:
def __init__(self, args, conf, helpers, controller=None):
def __init__(self, args, conf, helpers, stream_building_lock,
if controller is None:
c, error_msg = stem_utils.init_controller_with_config(conf)
assert c, error_msg
......@@ -42,7 +43,7 @@ class HelperRelayList:
self.helpers = helpers
def from_config(args, conf, controller=None):
def from_config(args, conf, stream_building_lock, controller=None):
''' Returns a new HelperRelayList and an empty string if everything
goes okay loading HelperRelays from the given config file. Otherwise,
returns None and an error string '''
......@@ -58,7 +59,8 @@ class HelperRelayList:
log.debug('Loading info for helper %s', key)
return HelperRelayList(
args, conf, helpers, controller=controller), ''
args, conf, helpers, stream_building_lock,
controller=controller), ''
def next(self, blacklist=[]):
''' Returns the next helper in the list that should be used. Do not
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment