From 54d6c61505b8b5d83f8d218b8fedf0229afe19a2 Mon Sep 17 00:00:00 2001 From: paulyufan2 Date: Mon, 29 Apr 2024 11:30:08 -0400 Subject: [PATCH] fix comments --- cns/restserver/v2/server.go | 7 +------ cns/service.go | 4 +--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cns/restserver/v2/server.go b/cns/restserver/v2/server.go index c8ca1aaf99..a3d8e0f9a3 100644 --- a/cns/restserver/v2/server.go +++ b/cns/restserver/v2/server.go @@ -47,10 +47,5 @@ func (s Server) Start(ctx context.Context, addr string) error { // after context is done, shutdown local server <-ctx.Done() - if err := e.Shutdown(ctx); err != nil { - logger.Errorf("failed to shutdown echo server due to %+v", err) - return errors.Wrap(err, "failed to shutdown echo server") - } - - return nil + return e.Shutdown(ctx) } diff --git a/cns/service.go b/cns/service.go index 0eedb61a95..998bf15c2d 100644 --- a/cns/service.go +++ b/cns/service.go @@ -76,7 +76,7 @@ func (service *Service) AddListener(config *common.ServiceConfig) error { } } else { // use the URL that customer provides by -c - logger.Warnf("Do not specify cns-url by -c option, this option will be deprecated!") + logger.Printf("CNS remote server url: %+v", nodeURL) // do not enable local server if customer uses -c option config.Server.EnableLocalServer = false @@ -86,8 +86,6 @@ func (service *Service) AddListener(config *common.ServiceConfig) error { } } - logger.Debugf("CNS remote server url: %+v", nodeURL) - nodeListener, err := acn.NewListener(nodeURL) if err != nil { return errors.Wrap(err, "Failed to construct url for node listener")