mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
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
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user