mirror of https://github.com/golang/go.git
net/http: stop ExampleServer_Shutdown from hanging on error
This commit is contained in:
parent
adcb2b1e7a
commit
0bb3dc08b6
|
|
@ -132,7 +132,7 @@ func ExampleServer_Shutdown() {
|
|||
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue