From 97efe99ae964e8f4e866d961282257e6f4293fd8 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 20 Jan 2017 11:45:29 +0000 Subject: Make worker listener config backwards compat --- synapse/config/workers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'synapse/config/workers.py') diff --git a/synapse/config/workers.py b/synapse/config/workers.py index 904789d155..b165c67ee7 100644 --- a/synapse/config/workers.py +++ b/synapse/config/workers.py @@ -29,3 +29,13 @@ class WorkerConfig(Config): self.worker_log_file = config.get("worker_log_file") self.worker_log_config = config.get("worker_log_config") self.worker_replication_url = config.get("worker_replication_url") + + if self.worker_listeners: + for listener in self.worker_listeners: + bind_address = listener.pop("bind_address", None) + bind_addresses = listener.setdefault("bind_addresses", []) + + if bind_address: + bind_addresses.append(bind_address) + elif not bind_addresses: + bind_addresses.append('') -- cgit 1.4.1