From e7c8703a6d283a99e145d5480c076c48cece2c4b Mon Sep 17 00:00:00 2001 From: Gaius Date: Fri, 15 Dec 2023 12:06:28 +0800 Subject: [PATCH] fix: add context timeout to health check (#2943) Signed-off-by: Gaius --- .github/workflows/lint.yml | 2 +- pkg/rpc/health/client/client.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 43732c105..f55103cdb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - name: Golangci lint uses: golangci/golangci-lint-action@v3 with: - version: v1.52.2 + version: v1.54 args: --verbose - name: Markdown lint diff --git a/pkg/rpc/health/client/client.go b/pkg/rpc/health/client/client.go index 7434701f3..6735530bd 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 }