Commit graph

5 commits

Author SHA1 Message Date
d1ef291c64
[] rpc: Use DeadlineExceeded error when creating stream failed by timeout
According to https://pkg.go.dev/context#pkg-variables, ContextCancelled
should be returned when the context is canceled for some reason other
than its deadline passing. So creating gRPC stream with dial timeout fits
better for context.DeadlineExceeded.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-02-18 09:49:24 +03:00
3264317b63
[] rpc: Cancel context after stream close
gRPC stream must be closed by `cancel` to prevent memleak.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-01-30 15:13:56 +03:00
1b8bd20fa0
[] rpc: Fix mem leak
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-01-29 17:02:22 +03:00
81c423e709 [] rpc: Make client stream initialization get cancelled by dial timeout
* `c.conn` may be already invalidated but the rpc client can't detect this.
  `NewStream` may hang trying to open a stream with invalidated connection.
  Using timer with `dialTimeout` for `NewStream` fixes this problem.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-06 09:49:44 +00:00
6ce73790ea [] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2024-10-22 14:05:12 +00:00