Skip to content

Commit

Permalink
fix sync config problems
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyx committed Jan 18, 2020
1 parent 8802f03 commit 953587c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion component/notify/componet_notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func SyncNamespaceConfig(namespace string) error {

func syncConfigs(namespace string, isAsync bool) error {

remoteConfigs, err := notifyRemoteConfig(nil, utils.Empty, isAsync)
remoteConfigs, err := notifyRemoteConfig(nil, namespace, isAsync)

if err != nil {
return fmt.Errorf("notifySyncConfigServices: %s", err)
Expand Down
7 changes: 6 additions & 1 deletion protocol/http/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@ func Request(requestURL string, connectionConfig *env.ConnectConfig, callBack *C
var responseBody []byte
var err error
var res *http.Response
var retries = maxRetries
if connectionConfig != nil && !connectionConfig.IsRetry {
retries = 1
}
for {

retry++

if retry > maxRetries {
if retry > retries {
break
}

Expand Down
3 changes: 0 additions & 3 deletions repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ func GetConfigCache(namespace string) agcache.CacheInterface {
if config == nil {
return nil
}
if !config.GetIsInit() {
config.GetWaitInit().Wait()
}

return config.GetCache()
}
Expand Down

0 comments on commit 953587c

Please sign in to comment.