diff options
author | David Robertson <davidr@element.io> | 2022-11-15 16:36:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-15 16:36:43 +0000 |
commit | 258b5285b6b486526dffef9431c2ab063913f42b (patch) | |
tree | f36309d0f3e88f9cf99a43caf705253e9c211e80 /synapse/server.py | |
parent | Send content rules with pattern_type to clients (#14356) (diff) | |
download | synapse-258b5285b6b486526dffef9431c2ab063913f42b.tar.xz |
Fix typechecking errors introduced in #14128 (#14455)
* Fix typechecking errors introduced in #14128 * Changelog * Correct annotations so that context_factory works if you don't use TLS
Diffstat (limited to '')
-rw-r--r-- | synapse/server.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/server.py b/synapse/server.py index c4e025af22..f0a60d0056 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -221,8 +221,6 @@ class HomeServer(metaclass=abc.ABCMeta): # instantiated during setup() for future return by get_datastores() DATASTORE_CLASS = abc.abstractproperty() - tls_server_context_factory: Optional[IOpenSSLContextFactory] - def __init__( self, hostname: str, @@ -258,6 +256,9 @@ class HomeServer(metaclass=abc.ABCMeta): self._module_web_resources: Dict[str, Resource] = {} self._module_web_resources_consumed = False + # This attribute is set by the free function `refresh_certificate`. + self.tls_server_context_factory: Optional[IOpenSSLContextFactory] = None + def register_module_web_resource(self, path: str, resource: Resource) -> None: """Allows a module to register a web resource to be served at the given path. |