mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 19:02:31 +08:00
feat: multiple addresses
This commit is contained in:
parent
2c9caf0845
commit
17d0af3bdf
@ -195,12 +195,13 @@ func (cm *ConnManager) Build(target resolver.Target, cc resolver.ClientConn, _ r
|
||||
log.ZDebug(context.Background(), "Build", "endpoints", endpoints)
|
||||
endpoints = subset(endpoints, subsetSize)
|
||||
addrs := make([]resolver.Address, 0, len(endpoints))
|
||||
log.ZDebug(context.Background(), "Build", "addrs", addrs)
|
||||
|
||||
for _, val := range endpoints {
|
||||
addrs = append(addrs, resolver.Address{
|
||||
Addr: val,
|
||||
})
|
||||
}
|
||||
log.ZDebug(context.Background(), "Build", "addrs", addrs)
|
||||
if err := cc.UpdateState(resolver.State{
|
||||
Addresses: addrs,
|
||||
}); err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user