Running the example code when not having permissions
to bind to port 80 will cause the program to hang after
printing the error message.
Change-Id: I2433ba2629b362fc8f1731e40cab5eea72ec354f
GitHub-Last-Rev:
0bb3dc08b6f646470fc6ff208ea12bca901a2299
GitHub-Pull-Request: golang/go#32947
Reviewed-on: https://go-review.googlesource.com/c/go/+/185157
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
if err := srv.ListenAndServe(); err != http.ErrServerClosed {
// Error starting or closing listener:
- log.Printf("HTTP server ListenAndServe: %v", err)
+ log.Fatalf("HTTP server ListenAndServe: %v", err)
}
<-idleConnsClosed