mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 14:33:50 +01:00
Use listen_tcp
for the replication listener
Fixes the "can't listen on 0.0.0.0" error. Also makes it more consistent with what we do elsewhere.
This commit is contained in:
parent
2a5a15aff8
commit
767686af48
1 changed files with 7 additions and 7 deletions
|
@ -266,14 +266,14 @@ class SynapseHomeServer(HomeServer):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif listener["type"] == "replication":
|
elif listener["type"] == "replication":
|
||||||
bind_addresses = listener["bind_addresses"]
|
services = listen_tcp(
|
||||||
for address in bind_addresses:
|
listener["bind_addresses"],
|
||||||
factory = ReplicationStreamProtocolFactory(self)
|
listener["port"],
|
||||||
server_listener = reactor.listenTCP(
|
ReplicationStreamProtocolFactory(self),
|
||||||
listener["port"], factory, interface=address
|
)
|
||||||
)
|
for s in services:
|
||||||
reactor.addSystemEventTrigger(
|
reactor.addSystemEventTrigger(
|
||||||
"before", "shutdown", server_listener.stopListening,
|
"before", "shutdown", s.stopListening,
|
||||||
)
|
)
|
||||||
elif listener["type"] == "metrics":
|
elif listener["type"] == "metrics":
|
||||||
if not self.get_config().enable_metrics:
|
if not self.get_config().enable_metrics:
|
||||||
|
|
Loading…
Reference in a new issue