Skip to content

Commit dc49090

Browse files
committed
Don't log server errors when Shutdown/Close are intentionally called (example, a shutdown signal), only for unexpected errors.
1 parent ccac8b0 commit dc49090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func main() {
3232
go func() {
3333
log.Printf("Server starting on port %s", port)
3434
err := httpServer.ListenAndServe()
35-
if err != nil {
35+
if err != nil && err != http.ErrServerClosed {
3636
log.Printf("Server Error: %s", err)
3737
}
3838
shutdownChannel <- syscall.SIGUSR1

0 commit comments

Comments
 (0)