... to work around some of the "unexpected EOF" failures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač
2023-02-09 20:21:50 +01:00
parent e9f30e5b65
commit 643a2359e4
294 changed files with 6816 additions and 4797 deletions

View File

@@ -19,8 +19,6 @@ import (
"strings"
"sync"
"time"
"golang.org/x/net/context/ctxhttp"
)
// Token represents the credentials used to authorize
@@ -229,7 +227,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
}
func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
r, err := ctxhttp.Do(ctx, ContextClient(ctx), req)
r, err := ContextClient(ctx).Do(req.WithContext(ctx))
if err != nil {
return nil, err
}