diff --git a/cmd/http-gw/server.go b/cmd/http-gw/server.go index c5852d8..f8a20d9 100644 --- a/cmd/http-gw/server.go +++ b/cmd/http-gw/server.go @@ -68,7 +68,8 @@ func newServer(ctx context.Context, serverInfo ServerInfo) (*server, error) { if serverInfo.TLS.Enabled { if err = tlsProvider.UpdateCert(serverInfo.TLS.CertFile, serverInfo.TLS.KeyFile); err != nil { - return nil, fmt.Errorf("failed to update cert: %w", err) + lnErr := ln.Close() + return nil, fmt.Errorf("failed to update cert (listener close: %v): %w", lnErr, err) } ln = tls.NewListener(ln, &tls.Config{