mirror of
https://github.com/golang/go
synced 2024-09-29 11:34:32 -06:00
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
Block a user