summary refs log tree commit diff
path: root/synapse/app/federation_reader.py
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2016-12-20 01:37:50 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2016-12-20 01:37:50 +0100
commit702c020e58dd8663e66c25f88fba2a02264e7357 (patch)
treeb272f062a4e843423495973d286bd003fe07f061 /synapse/app/federation_reader.py
parentMerge pull request #1711 from matrix-org/matthew/utf8-password-change (diff)
downloadsynapse-702c020e58dd8663e66c25f88fba2a02264e7357.tar.xz
Fix check for bind_address
The empty string is a valid setting for the bind_address option, so
explicitly check for None here instead.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'synapse/app/federation_reader.py')
-rw-r--r--synapse/app/federation_reader.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/app/federation_reader.py b/synapse/app/federation_reader.py
index 321dfc7cd5..c6810b83db 100644
--- a/synapse/app/federation_reader.py
+++ b/synapse/app/federation_reader.py
@@ -101,7 +101,7 @@ class FederationReaderServer(HomeServer):
 
         root_resource = create_resource_tree(resources, Resource())
 
-        if bind_address:
+        if bind_address is not None:
             bind_addresses.append(bind_address)
 
         for address in bind_addresses:
@@ -126,7 +126,7 @@ class FederationReaderServer(HomeServer):
                 bind_address = listener.get("bind_address", None)
                 bind_addresses = listener.get("bind_addresses", [])
 
-                if bind_address:
+                if bind_address is not None:
                     bind_addresses.append(bind_address)
 
                 for address in bind_addresses: