internal: fix crash when port 9000 is in use (#4863)

fix crash when port 9000 is in use

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L
2023-03-07 13:27:46 +01:00
committed by GitHub
parent 885aeddbdc
commit 41d17dc543
6 changed files with 12 additions and 7 deletions

View File

@ -63,7 +63,8 @@ func (ws *WebServer) Shutdown() {
func (ws *WebServer) listenPlain() {
ln, err := net.Listen("tcp", config.Get().Listen.HTTP)
if err != nil {
ws.log.WithError(err).Fatal("failed to listen")
ws.log.WithError(err).Warning("failed to listen")
return
}
proxyListener := &proxyproto.Listener{Listener: ln}
defer proxyListener.Close()