summary refs log tree commit diff
path: root/synapse/app/user_dir.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-01-28 17:18:33 +0000
committerGitHub <noreply@github.com>2019-01-28 17:18:33 +0000
commit5d976c0c7ce210916ec28b2112fe4c17e42694e8 (patch)
tree9b47c480286769a4b1ea3e48ca6dfdb1b9aca05a /synapse/app/user_dir.py
parentFix UPSERTs on SQLite 3.24+ (#4477) (diff)
downloadsynapse-5d976c0c7ce210916ec28b2112fe4c17e42694e8.tar.xz
Fix worker TLS (#4492)
* load cert

* changelog

* fix
Diffstat (limited to 'synapse/app/user_dir.py')
-rw-r--r--synapse/app/user_dir.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/synapse/app/user_dir.py b/synapse/app/user_dir.py
index 0a5f62b509..176d55a783 100644
--- a/synapse/app/user_dir.py
+++ b/synapse/app/user_dir.py
@@ -211,24 +211,24 @@ def start(config_options):
     # Force the pushers to start since they will be disabled in the main config
     config.update_user_directory = True
 
-    tls_server_context_factory = context_factory.ServerContextFactory(config)
-    tls_client_options_factory = context_factory.ClientTLSOptionsFactory(config)
-
-    ps = UserDirectoryServer(
+    ss = UserDirectoryServer(
         config.server_name,
         db_config=config.database_config,
-        tls_server_context_factory=tls_server_context_factory,
-        tls_client_options_factory=tls_client_options_factory,
         config=config,
         version_string="Synapse/" + get_version_string(synapse),
         database_engine=database_engine,
     )
 
-    ps.setup()
-    ps.start_listening(config.worker_listeners)
+    ss.setup()
 
     def start():
-        ps.get_datastore().start_profiling()
+        ss.config.read_certificate_from_disk()
+        ss.tls_server_context_factory = context_factory.ServerContextFactory(config)
+        ss.tls_client_options_factory = context_factory.ClientTLSOptionsFactory(
+            config
+        )
+        ss.start_listening(config.worker_listeners)
+        ss.get_datastore().start_profiling()
 
     reactor.callWhenRunning(start)