Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
xxjwxc committed Aug 24, 2021
1 parent 32ef744 commit 29d61bf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions client/resolver.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package client

import (
"sync"

"github.com/gmsec/micro/naming"
"github.com/gmsec/micro/registry"
"github.com/xxjwxc/public/mylog"
Expand Down Expand Up @@ -39,12 +37,10 @@ type myResolver struct {
cc resolver.ClientConn
watcher naming.Watcher
addrsStore map[string]*naming.Update
wg sync.WaitGroup
isClose bool
}

func (r *myResolver) start() {
r.wg.Add(1)
go func() {
for {
updates, err := r.watcher.Next()
Expand Down Expand Up @@ -85,7 +81,6 @@ func (r *myResolver) start() {
break
}
}
r.wg.Done()
}()

}
Expand All @@ -96,6 +91,5 @@ func (*myResolver) ResolveNow(o resolver.ResolveNowOptions) {

func (r *myResolver) Close() {
r.isClose = true
r.wg.Wait()
mylog.Debugf("Close:%v", r.target.Endpoint)
}

0 comments on commit 29d61bf

Please sign in to comment.