Skip to content

Commit 7f96480

Browse files
authored
wrap serve with log.fatal for visible failures (#9)
This closes #8 and implements a minor cleanup.
1 parent a4f05cd commit 7f96480

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

main.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ func main() {
105105
TLSConfig: m.TLSConfig(),
106106
}
107107
s.Handler = mux
108-
s.ListenAndServeTLS("", "")
109-
} else {
110-
log.Fatal(http.ListenAndServeTLS(*fromURL, *certFile, *keyFile, mux))
108+
log.Fatal(s.ListenAndServeTLS("", ""))
111109
}
110+
111+
// Domain is not provided, serve using provided/generated certificate files
112+
log.Fatal(http.ListenAndServeTLS(*fromURL, *certFile, *keyFile, mux))
113+
112114
}

0 commit comments

Comments
 (0)