fix:scheduler's health client not close (#1975)
Signed-off-by: bigerous <cuidajun.cdj@alibaba-inc.com>
This commit is contained in:
parent
88df60778b
commit
2833353d0d
|
|
@ -109,6 +109,7 @@ func (d *dynconfigManager) GetResolveSchedulerAddrs() ([]resolver.Address, error
|
||||||
logger.Errorf("get health client %s failed: %s", addr, err.Error())
|
logger.Errorf("get health client %s failed: %s", addr, err.Error())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
defer healthClient.Close()
|
||||||
|
|
||||||
if err := healthClient.Check(context.Background(), &healthpb.HealthCheckRequest{}); err != nil {
|
if err := healthClient.Check(context.Background(), &healthpb.HealthCheckRequest{}); err != nil {
|
||||||
logger.Errorf("scheduler address %s is unreachable: %s", addr, err.Error())
|
logger.Errorf("scheduler address %s is unreachable: %s", addr, err.Error())
|
||||||
|
|
|
||||||
|
|
@ -189,6 +189,7 @@ func (d *dynconfig) GetResolveSeedPeerAddrs() ([]resolver.Address, error) {
|
||||||
logger.Errorf("get health client %s failed: %s", addr, err.Error())
|
logger.Errorf("get health client %s failed: %s", addr, err.Error())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
defer healthClient.Close()
|
||||||
|
|
||||||
if err := healthClient.Check(context.Background(), &healthpb.HealthCheckRequest{}); err != nil {
|
if err := healthClient.Check(context.Background(), &healthpb.HealthCheckRequest{}); err != nil {
|
||||||
logger.Errorf("seed peer address %s is unreachable: %s", addr, err.Error())
|
logger.Errorf("seed peer address %s is unreachable: %s", addr, err.Error())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue