address review comments

Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>
Signed-off-by: mecoding1 <118708378+mecoding1@users.noreply.github.com>
This commit is contained in:
Pravin Pushkar 2022-11-18 00:07:59 +05:30 committed by mecoding1
parent 1773283f79
commit 06ffaa52b5
1 changed files with 7 additions and 0 deletions

View File

@ -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)