fix: add context timeout to health check (#2943)

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2023-12-15 12:06:28 +08:00 committed by GitHub
parent 839e476ecb
commit e7c8703a6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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
}