Gophercloud 1.10 introduced context aware functions.
For requests sent by ProviderClient.doRequest the ProviderClient.Context field and the passed in ctx are merged:
|
if client.Context != nil { |
|
var cancel context.CancelFunc |
|
ctx, cancel = ctxt.Merge(ctx, client.Context) |
|
defer cancel() |
|
} |
However, that merged context is also canceled using defer. This prevents reading from the Body of the returned http.Response. Thus when using ProviderClient.Context, every method that needs the request result currently fails with a context canceled error.