Use DialTimeout
for gRPC dial #280
1 changed files with 2 additions and 0 deletions
|
@ -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),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue