From f86f06a403f1ca1d70d813de7ca511bb4727b087 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 23 Jul 2020 19:18:24 +0300 Subject: [PATCH] Check connection to homeserver before trying to log in for e2be --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 5cd2e8f..231c27f 100644 --- a/main.go +++ b/main.go @@ -266,6 +266,8 @@ func (bridge *Bridge) Start() { bridge.Log.Fatalln("Failed to initialize database:", err) os.Exit(15) } + bridge.Log.Debugln("Checking connection to homeserver") + bridge.ensureConnection() if bridge.Crypto != nil { err := bridge.Crypto.Init() if err != nil { @@ -278,8 +280,6 @@ func (bridge *Bridge) Start() { bridge.Provisioning.Init() } bridge.LoadRelaybot() - bridge.Log.Debugln("Checking connection to homeserver") - bridge.ensureConnection() bridge.Log.Debugln("Starting application service HTTP server") go bridge.AS.Start() bridge.Log.Debugln("Starting event processor")