summary refs log tree commit diff
path: root/synapse/app
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-10 16:16:24 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-10 16:16:24 +0100
commit2faffc52eed70df7cf1adc021633f4a427917c90 (patch)
treeea2da9ef011804d5a9287c0d62a7bd72486b7cdb /synapse/app
parentNo need for a tiny run() function any more, just use reactor.run() directly (diff)
downloadsynapse-2faffc52eed70df7cf1adc021633f4a427917c90.tar.xz
Make sure not to open our TCP ports until /after/ the DB is nicely prepared ready for use
Diffstat (limited to 'synapse/app')
-rwxr-xr-xsynapse/app/homeserver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index e9a6321020..e6377e3060 100755
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -207,7 +207,6 @@ def setup():
         web_client=config.webclient,
         redirect_root_to_web_client=True,
     )
-    hs.start_listening(config.bind_port, config.unsecure_port)
 
     prepare_database(hs.get_db_name())
 
@@ -220,6 +219,8 @@ def setup():
         f.namespace['hs'] = hs
         reactor.listenTCP(config.manhole, f, interface='127.0.0.1')
 
+    hs.start_listening(config.bind_port, config.unsecure_port)
+
     if config.daemonize:
         print config.pid_file
         daemon = Daemonize(