net/http: Server.Shutdown doc example bug: no exit on error #30641
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
It appears the doc example that is provided for
http.Server.Shutdown
has a bug.https://godoc.org/net/http#Server.Shutdown
The example shows that when the listener returns, it only prints the error as opposed to being fatal. This would cause the process to block on the done channel until SIGINT is actually sent.
Reproduction of bug:
https://play.golang.org/p/LCSLoMWIMrR
Should the error handling use
log.Fatal
?The text was updated successfully, but these errors were encountered: