api: fix log message when stopping the API server

This commit is contained in:
Quentin Machu 2016-02-01 18:51:13 -05:00 committed by Jimmy Zelinskie
parent 5fdd9d1a07
commit 116ce1a806

View File

@ -109,10 +109,12 @@ func listenAndServeWithStopper(srv *graceful.Server, st *utils.Stopper, certFile
err = srv.ListenAndServe()
}
if err != nil {
if opErr, ok := err.(*net.OpError); !ok || (ok && opErr.Op != "accept") {
log.Fatal(err)
}
}
}
// tlsClientConfig initializes a *tls.Config using the given CA. The resulting
// *tls.Config is meant to be used to configure an HTTP server to do client