Skip to content

Commit

Permalink
Log what address/port we're listening on
Browse files Browse the repository at this point in the history
Always nice not to have to guess. Also feels more consistent than just
doing it for the letsencrypt endpoint.
  • Loading branch information
liclac committed Dec 19, 2021
1 parent c789316 commit 36a6b24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,15 @@ func (r *router) Start() {

// and serve the actual TLS handler
go func() {
logrus.Infof("listening on %s", r.srv.Addr)
if err := r.srv.ListenAndServeTLS("", ""); err != nil && err != http.ErrServerClosed {
logrus.Fatalf("listen: %s", err)
}
}()
} else {
// no tls required
go func() {
logrus.Infof("listening on %s", r.srv.Addr)
if err := r.srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
logrus.Fatalf("listen: %s", err)
}
Expand Down

0 comments on commit 36a6b24

Please sign in to comment.