Panic if http.Serve() returns an error

This commit is contained in:
Jakob Borg 2014-09-18 09:27:26 +02:00
parent 45af549897
commit 0b1136ad82
1 changed files with 6 additions and 1 deletions

View File

@ -140,7 +140,12 @@ func startGUI(cfg config.GUIConfiguration, assetDir string, m *model.Model) erro
handler = redirectToHTTPSMiddleware(handler)
}
go http.Serve(listener, handler)
go func() {
err := http.Serve(listener, handler)
if err != nil {
panic(err)
}
}()
return nil
}