diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -151,6 +151,7 @@ func readRegistration(file string) mxlib.Registration { func main() { flag.Parse() + // Read configuration config_file := readConfig() config = &config_file @@ -163,13 +164,12 @@ func main() { reg_file := readRegistration(config.Registration) registration = ®_file - errch, err := StartAppService() - if err != nil { - log.Fatal(err) - } - - StartWeb() + // Start appservice and web management interface + errch := make(chan error) + StartAppService(errch) + StartWeb(errch) + // Wait for an error somewhere err = <-errch if err != nil { log.Fatal(err) |