fix: add context timeout to health check (#2943)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
839e476ecb
commit
e7c8703a6d
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
- name: Golangci lint
|
- name: Golangci lint
|
||||||
uses: golangci/golangci-lint-action@v3
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
version: v1.52.2
|
version: v1.54
|
||||||
args: --verbose
|
args: --verbose
|
||||||
|
|
||||||
- name: Markdown lint
|
- name: Markdown lint
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ func Check(ctx context.Context, target string, opts ...grpc.DialOption) error {
|
||||||
}
|
}
|
||||||
defer healthClient.Close()
|
defer healthClient.Close()
|
||||||
|
|
||||||
if err := healthClient.Check(context.Background(), &healthpb.HealthCheckRequest{}); err != nil {
|
if err := healthClient.Check(ctx, &healthpb.HealthCheckRequest{}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue