Skip to content

Commit

Permalink
fix: instance overwrite (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
justlorain authored Dec 10, 2022
1 parent f8f651d commit 5bfb40c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions redis/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ func (r *redisResolver) Target(_ context.Context, target *discovery.TargetInfo)
func (r *redisResolver) Resolve(ctx context.Context, desc string) (discovery.Result, error) {
rdb := r.client
fvs := rdb.HGetAll(ctx, generateKey(desc, server)).Val()
var (
ri registryInfo
its []discovery.Instance
)
var its []discovery.Instance
for f, v := range fvs {
var ri registryInfo
err := json.Unmarshal([]byte(v), &ri)
if err != nil {
hlog.Warnf("HERTZ: fail to unmarshal with err: %v, ignore instance Addr: %v", err, f)
Expand Down

0 comments on commit 5bfb40c

Please sign in to comment.