client: add missing retry cancel check while backing off requests
Some checks are pending
Go / Lint (latest) (push) Waiting to run
Go / Build (old, libolm) (push) Waiting to run
Go / Build (latest, libolm) (push) Waiting to run
Go / Build (old, goolm) (push) Waiting to run
Go / Build (latest, goolm) (push) Waiting to run

This commit is contained in:
Nick Mills-Barrett 2025-12-05 11:36:43 +00:00 committed by GitHub
commit f6d8362278
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -614,7 +614,9 @@ func (cli *Client) doRetry(
select {
case <-time.After(backoff):
case <-req.Context().Done():
return nil, nil, req.Context().Err()
if !errors.Is(context.Cause(req.Context()), ErrContextCancelRetry) {
return nil, nil, req.Context().Err()
}
}
if cli.UpdateRequestOnRetry != nil {
req = cli.UpdateRequestOnRetry(req, cause)