diff --git a/.travis.yml b/.travis.yml index 6b7c8dc..5804a55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: go go_import_path: github.com/mailgun/groupcache os: linux -dist: trusty +dist: xenial sudo: false script: @@ -12,6 +12,7 @@ go: - 1.13.x - 1.14.x - 1.15.x + - 1.17.x - master cache: diff --git a/http.go b/http.go index 062ab76..9916bb2 100644 --- a/http.go +++ b/http.go @@ -274,15 +274,11 @@ func (h *httpGetter) makeRequest(ctx context.Context, m string, in request, b io url.QueryEscape(in.GetGroup()), url.QueryEscape(in.GetKey()), ) - - req, err := http.NewRequest(m, u, b) + req, err := http.NewRequestWithContext(ctx, method, u, nil) if err != nil { return err } - // Pass along the context to the RoundTripper - req = req.WithContext(ctx) - tr := http.DefaultTransport if h.getTransport != nil { tr = h.getTransport(ctx)