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:
parent
1773283f79
commit
06ffaa52b5
|
@ -15,6 +15,7 @@ package appconfig
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -302,6 +303,9 @@ func (r *ConfigurationStore) doSubscribe(ctx context.Context, req *configuration
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
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)
|
r.logger.Debugf("azure appconfig error: fail to get sentinel key or sentinel's key %s value is unchanged: %s", sentinelKey, err)
|
||||||
} else {
|
} else {
|
||||||
// if sentinel key has changed then update the Etag value.
|
// 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,
|
Metadata: req.Metadata,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, context.Canceled) {
|
||||||
|
return
|
||||||
|
}
|
||||||
r.logger.Errorf("azure appconfig error: fail to get configuration key changes: %s", err)
|
r.logger.Errorf("azure appconfig error: fail to get configuration key changes: %s", err)
|
||||||
} else {
|
} else {
|
||||||
r.handleSubscribedChange(ctx, handler, items, id)
|
r.handleSubscribedChange(ctx, handler, items, id)
|
||||||
|
|
Loading…
Reference in New Issue