0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-17 02:10:10 +01:00
forgejo/modules
zeripath fe09ee564d
Prevent context deadline error propagation in GetCommitsInfo ()
* Prevent context deadline error propagation in GetCommitsInfo

Although `WalkGitLog` tries to test for `context.DeadlineExceededErr`
there is a small chance that the error will propagate to the reader
before it is recognised. This will cause the error to propagate up to
`renderDirectoryFiles` and cause a http status 500.

Here we check that the error passed is a `DeadlineExceededErr` via error.Is

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-07-14 00:24:29 +02:00
..
activitypub
analyze
appstate
auth
avatar
base
cache
charset
container
context
convert Add more linters to improve code readability () 2022-06-20 12:02:49 +02:00
csv
doctor
emoji
eventsource
generate
git
gitgraph
graceful
hcaptcha
highlight
hostmatcher
httpcache
httplib
indexer
json
lfs
log
markup
metrics
migration
mirror
nosql
notification
options
packages
paginator
password
pprof
private
process
proxy
public
queue Add more linters to improve code readability () 2022-06-20 12:02:49 +02:00
recaptcha
references
regexplru
repository
secret
session
setting
sitemap
ssh
storage
structs Add more linters to improve code readability () 2022-06-20 12:02:49 +02:00
svg
sync
templates
test
timeutil
translation
typesniffer
updatechecker
upload
uri
user
util
validation
web