From 06ffaa52b51e9c5eb5b9a162aa85ca069d66ab45 Mon Sep 17 00:00:00 2001 From: Pravin Pushkar Date: Fri, 18 Nov 2022 00:07:59 +0530 Subject: [PATCH] address review comments Signed-off-by: Pravin Pushkar Signed-off-by: mecoding1 <118708378+mecoding1@users.noreply.github.com> --- configuration/azure/appconfig/appconfig.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configuration/azure/appconfig/appconfig.go b/configuration/azure/appconfig/appconfig.go index d93ee96d4..849763c5c 100644 --- a/configuration/azure/appconfig/appconfig.go +++ b/configuration/azure/appconfig/appconfig.go @@ -15,6 +15,7 @@ package appconfig import ( "context" + "errors" "fmt" "strconv" "sync" @@ -302,6 +303,9 @@ func (r *ConfigurationStore) doSubscribe(ctx context.Context, req *configuration }, ) if err != nil { + if errors.Is(err, context.Canceled) { + return + } r.logger.Debugf("azure appconfig error: fail to get sentinel key or sentinel's key %s value is unchanged: %s", sentinelKey, err) } else { // if sentinel key has changed then update the Etag value. @@ -311,6 +315,9 @@ func (r *ConfigurationStore) doSubscribe(ctx context.Context, req *configuration Metadata: req.Metadata, }) if err != nil { + if errors.Is(err, context.Canceled) { + return + } r.logger.Errorf("azure appconfig error: fail to get configuration key changes: %s", err) } else { r.handleSubscribedChange(ctx, handler, items, id)