This commit is contained in:
Simon Zolin 2019-11-20 18:25:27 +03:00
parent 1fc70cbc08
commit fd26af2677

View File

@ -372,11 +372,13 @@ func cleanup() {
// Stop HTTP server, possibly waiting for all active connections to be closed // Stop HTTP server, possibly waiting for all active connections to be closed
func stopHTTPServer() { func stopHTTPServer() {
log.Info("Stopping HTTP server...")
config.httpsServer.shutdown = true config.httpsServer.shutdown = true
if config.httpsServer.server != nil { if config.httpsServer.server != nil {
config.httpsServer.server.Shutdown(context.TODO()) config.httpsServer.server.Shutdown(context.TODO())
} }
config.httpServer.Shutdown(context.TODO()) config.httpServer.Shutdown(context.TODO())
log.Info("Stopped HTTP server")
} }
// This function is called before application exits // This function is called before application exits