[#184] *: Unify done contexts handling

If `ctx.Done()`, return `ctx.Err()` in every function that returns an error.

Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
Pavel Karpy 2023-03-28 17:58:28 +03:00
parent 91717d4b98
commit c218d7a259
3 changed files with 4 additions and 4 deletions

View file

@ -340,7 +340,7 @@ func (c *Client) Wait(ctx context.Context, n uint32) error {
for {
select {
case <-ctx.Done():
return nil
return ctx.Err()
default:
}