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,8 +109,10 @@ func listenAndServeWithStopper(srv *graceful.Server, st *utils.Stopper, certFile
err = srv.ListenAndServe() err = srv.ListenAndServe()
} }
if opErr, ok := err.(*net.OpError); !ok || (ok && opErr.Op != "accept") { if err != nil {
log.Fatal(err) if opErr, ok := err.(*net.OpError); !ok || (ok && opErr.Op != "accept") {
log.Fatal(err)
}
} }
} }