diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-03-04 18:08:29 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-03-04 21:29:05 +0100 |
commit | 3bbeb5688c4452a336af07be1e8cec44dac7d6ce (patch) | |
tree | f7e9f79839d1c050c148b5265c066f98a088fa8a /resources/transform.go | |
parent | 184a67ac4704b88083c43a68a5f85800192d7ff1 (diff) | |
download | hugo-3bbeb5688c4452a336af07be1e8cec44dac7d6ce.tar.gz hugo-3bbeb5688c4452a336af07be1e8cec44dac7d6ce.zip |
Fix "context canceled" with partial
Make sure the context used for timeouts isn't created based on the incoming
context, as we have cases where this can cancel the context prematurely.
Fixes #10789
Diffstat (limited to 'resources/transform.go')
-rw-r--r-- | resources/transform.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/transform.go b/resources/transform.go index 4ab51485e..fe438e366 100644 --- a/resources/transform.go +++ b/resources/transform.go @@ -164,12 +164,12 @@ type resourceAdapter struct { *resourceAdapterInner } -func (r *resourceAdapter) Content(context.Context) (any, error) { +func (r *resourceAdapter) Content(ctx context.Context) (any, error) { r.init(false, true) if r.transformationsErr != nil { return nil, r.transformationsErr } - return r.target.Content(context.Background()) + return r.target.Content(ctx) } func (r *resourceAdapter) Err() resource.ResourceError { |