GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Check error of ListenAndServe(TLS).

We can safely ignore http.ErrServerClosed but we really ought to check
for other errors.
parent 69bd083b
...@@ -165,9 +165,12 @@ func main() { ...@@ -165,9 +165,12 @@ func main() {
log.Printf("Starting service on port %s.", addr) log.Printf("Starting service on port %s.", addr)
go func() { go func() {
if certFilename != "" && keyFilename != "" { if certFilename != "" && keyFilename != "" {
srv.ListenAndServeTLS(certFilename, keyFilename) err = srv.ListenAndServeTLS(certFilename, keyFilename)
} else { } else {
srv.ListenAndServe() err = srv.ListenAndServe()
}
if err != http.ErrServerClosed {
log.Fatalf("Failed to run Web server: %s", err)
} }
}() }()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment