From f15da089e72daed2e320e9b07a665ea30ae551e0 Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 15 Dec 2023 11:40:27 +0800 Subject: [PATCH] fix: add context timeout to health check Signed-off-by: Gaius --- pkg/rpc/health/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rpc/health/client/client.go b/pkg/rpc/health/client/client.go index 7434701f37a..6735530bd61 100644 --- a/pkg/rpc/health/client/client.go +++ b/pkg/rpc/health/client/client.go @@ -77,7 +77,7 @@ func Check(ctx context.Context, target string, opts ...grpc.DialOption) error { } defer healthClient.Close() - if err := healthClient.Check(context.Background(), &healthpb.HealthCheckRequest{}); err != nil { + if err := healthClient.Check(ctx, &healthpb.HealthCheckRequest{}); err != nil { return err }