Skip to content

Commit

Permalink
fix: add context timeout to health check
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <gaius.qi@gmail.com>
  • Loading branch information
gaius-qi committed Dec 15, 2023
1 parent 1303d77 commit f15da08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/rpc/health/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit f15da08

Please sign in to comment.