summary refs log tree commit diff
path: root/synapse/config/server.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-02-13 14:16:02 +0000
committerGitHub <noreply@github.com>2019-02-13 14:16:02 +0000
commit464c301584bf614a24a7696e81213be78bd8cfed (patch)
tree90729ad8316f91e3456bd788894416f9873fa202 /synapse/config/server.py
parentFixup changelog (diff)
parentUpdate synapse/app/_base.py (diff)
downloadsynapse-464c301584bf614a24a7696e81213be78bd8cfed.tar.xz
Merge pull request #4636 from matrix-org/rav/bind_address_fixes
Fix errors when using default bind_addresses with replication/metrics listeners
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r--synapse/config/server.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index c5c3aac8ed..93a30e4cfa 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -151,7 +151,11 @@ class ServerConfig(Config):
 
             # if we still have an empty list of addresses, use the default list
             if not bind_addresses:
-                bind_addresses.extend(DEFAULT_BIND_ADDRESSES)
+                if listener['type'] == 'metrics':
+                    # the metrics listener doesn't support IPv6
+                    bind_addresses.append('0.0.0.0')
+                else:
+                    bind_addresses.extend(DEFAULT_BIND_ADDRESSES)
 
             self.listeners.append(listener)