mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
test discov
This commit is contained in:
parent
cd273a9094
commit
f3dacda90e
@ -39,6 +39,7 @@ func (s *ZkClient) Build(target resolver.Target, cc resolver.ClientConn, opts re
|
|||||||
s.lock.Lock()
|
s.lock.Lock()
|
||||||
defer s.lock.Unlock()
|
defer s.lock.Unlock()
|
||||||
s.resolvers[strings.TrimLeft(target.URL.Path, "/")] = r
|
s.resolvers[strings.TrimLeft(target.URL.Path, "/")] = r
|
||||||
|
log.ZDebug(context.Background(), "build resolver finished", "target", target, "cc", cc)
|
||||||
return r, nil
|
return r, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,11 +101,11 @@ func NewClient(zkServers []string, zkRoot string, options ...ZkOption) (*ZkClien
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
resolver.Register(client)
|
resolver.Register(client)
|
||||||
// var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
// wg.Add(2)
|
wg.Add(1)
|
||||||
// go client.refresh(&wg)
|
// go client.refresh(&wg)
|
||||||
// go client.watch(&wg)
|
go client.watch(&wg)
|
||||||
// wg.Wait()
|
wg.Wait()
|
||||||
return client, nil
|
return client, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user