mirror of
https://codeberg.org/git-pages/git-pages.git
synced 2026-05-14 11:11:35 +00:00
Fix timeout bug introduced in commit 9c6f735d.
This bug would cause POST hooks triggered for large repositories to silently fail. We need the update context to have the principal (which is tied to the HTTP request), but not the cancellation (which is also tied to the HTTP request and is triggered once the request is done either way).
This commit is contained in:
@@ -770,7 +770,7 @@ func postPage(w http.ResponseWriter, r *http.Request) error {
|
||||
result := UpdateFromRepository(ctx, webRoot, repoURL, auth.branch)
|
||||
resultChan <- result
|
||||
observeSiteUpdate("webhook", &result)
|
||||
}(r.Context())
|
||||
}(context.WithoutCancel(r.Context()))
|
||||
|
||||
var result UpdateResult
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user