authorize: change http addr if conflict (#355)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
Bobby DeSimone 2019-10-07 17:13:21 -07:00 committed by GitHub
parent badd8d69af
commit c0bcab5171
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 5 deletions

View file

@ -48,9 +48,11 @@ func NewServer(opt *ServerOptions, h http.Handler, wg *sync.WaitGroup) (*http.Se
go func() {
defer wg.Done()
if err := srv.Serve(ln); err != http.ErrServerClosed {
log.Error().Err(err).Msg("internal/httputil: tls server crashed")
sublogger.Error().Err(err).Msg("internal/httputil: http server crashed")
}
}()
sublogger.Info().Msg("internal/httputil: http server started")
return srv, nil
}