]> source.dussan.org Git - gitea.git/commit
Check for context exceeded in WalkGitLog (#17319)
authorzeripath <art27@cantab.net>
Fri, 15 Oct 2021 18:41:34 +0000 (19:41 +0100)
committerGitHub <noreply@github.com>
Fri, 15 Oct 2021 18:41:34 +0000 (19:41 +0100)
commit58cd55d3535e5afe551610cb74588b33d97786a2
tree6d1b5aa36eccc5ec23bb0a1500dc90e086b917bb
parenta889d0cc8c70431d43a9e46a6cf859f7b490aeb3
Check for context exceeded in WalkGitLog (#17319)

There is a slight race in checking of a context deadline exceed in #16467
which leads to a 500 on the repository page.

The solution is to check the error coming back from `*LogNameStatusRepoParser.Next()`
and if it is the `ContextDeadlineExceeded` break from the loop.

Fix #17314

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/git/log_name_status.go