Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Jun 16, 2020
1 parent e394a25 commit b876a82
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 6 additions & 1 deletion synapse/app/generic_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,12 @@ class GenericWorkerServer(HomeServer):
def _listen_http(self, listener_config: ListenerConfig):
port = listener_config.port
bind_addresses = listener_config.bind_addresses
site_tag = listener_config.http_options.tag or port

assert listener_config.http_options is not None

site_tag = listener_config.http_options.tag
if site_tag is None:
site_tag = port
resources = {}
for res in listener_config.http_options.resources:
for name in res.names:
Expand Down
4 changes: 3 additions & 1 deletion synapse/app/homeserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ def _listener_http(self, config: HomeServerConfig, listener_config: ListenerConf
port = listener_config.port
bind_addresses = listener_config.bind_addresses
tls = listener_config.tls
site_tag = listener_config.http_options.tag or port
site_tag = listener_config.http_options.tag
if site_tag is None:
site_tag = port

resources = {}
for res in listener_config.http_options.resources:
Expand Down
8 changes: 4 additions & 4 deletions synapse/config/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@
--------------------------------------------------------------------------------"""


KNOWN_LISTENER_TYPES = [
KNOWN_LISTENER_TYPES = {
"http",
"metrics",
"manhole",
"replication",
]
}

KNOWN_RESOURCES = [
KNOWN_RESOURCES = {
"client",
"consent",
"federation",
Expand All @@ -75,7 +75,7 @@
"replication",
"static",
"webclient",
]
}


@attr.s(frozen=True)
Expand Down

0 comments on commit b876a82

Please sign in to comment.