Skip to content

Commit

Permalink
fix: repair for updateCacheWhenEmpty not working
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiangwuxian committed Dec 8, 2023
1 parent 5fedf57 commit eb5d6aa
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions clients/naming_client/naming_cache/subscribe_callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package naming_cache
import (
"sync"

"github.com/pkg/errors"

"github.com/nacos-group/nacos-sdk-go/v2/clients/cache"
"github.com/nacos-group/nacos-sdk-go/v2/common/logger"
"github.com/nacos-group/nacos-sdk-go/v2/model"
Expand Down Expand Up @@ -75,10 +73,6 @@ func (ed *SubscribeCallback) ServiceChanged(cacheKey string, service *model.Serv
funcs, ok := ed.callbackFuncMap.Get(cacheKey)
if ok {
for _, funcItem := range funcs.([]*func(services []model.Instance, err error)) {
if len(service.Hosts) == 0 {
(*funcItem)(service.Hosts, errors.New("[client.Subscribe] subscribe failed,hosts is empty"))
continue
}
(*funcItem)(service.Hosts, nil)
}
}
Expand Down

0 comments on commit eb5d6aa

Please sign in to comment.