[#9999] client: Use DialTimeout for gRPC dial
All checks were successful
DCO / DCO (pull_request) Successful in 47s
Tests and linters / Tests (pull_request) Successful in 1m25s
Tests and linters / Lint (pull_request) Successful in 1m56s

After removing `grpc.Dial` from client `DialTimeout` used only if
custom dialer provided. Client uses `BalanceOf` instead of `grpc.Dial`,
so it is required to use `DialTimeout` to not to use RPC timeout.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-10-07 16:54:54 +03:00
parent 997346ef95
commit ccbf007e5d

View file

@ -100,6 +100,8 @@ func (c *Client) Dial(ctx context.Context, prm PrmDial) error {
c.setFrostFSAPIServer((*coreServer)(&c.c))
ctx, cancel := context.WithTimeout(ctx, prm.DialTimeout)
defer cancel()
_, err := rpc.Balance(&c.c, new(v2accounting.BalanceRequest),
client.WithContext(ctx),
)