Infer no_tls from presence of TLS listeners

Rather than have to specify `no_tls` explicitly, infer whether we need to load
the TLS keys etc from whether we have any TLS-enabled listeners.
This commit is contained in:
Richard van der Hoff 2019-02-11 17:57:58 +00:00
parent 15272f837c
commit 4fddf8fc77
10 changed files with 27 additions and 20 deletions

View file

@ -215,7 +215,7 @@ def refresh_certificate(hs):
"""
hs.config.read_certificate_from_disk()
if hs.config.no_tls:
if not hs.config.has_tls_listener():
# nothing else to do here
return