You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/services
zeripath 41fcf7b7de
Prevent dangling archiver goroutine (#19516)
Within doArchive there is a service goroutine that performs the
archiving function.  This goroutine reports its error using a `chan
error` called `done`. Prior to this PR this channel had 0 capacity
meaning that the goroutine would block until the `done` channel was
cleared - however there are a couple of ways in which this channel might
not be read.

The simplest solution is to add a single space of capacity to the
goroutine which will mean that the goroutine will always complete and
even if the `done` channel is not read it will be simply garbage
collected away.

(The PR also contains two other places when setting up the indexers
which do not leak but where the blocking of the sending goroutine is
also unnecessary and so we should just add a small amount of capacity
and let the sending goroutine complete as soon as it can.)

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
2 years ago
..
agit Remove `git.Command.Run` and `git.Command.RunInDir*` (#19280) 2 years ago
asymkey Use a struct as test options (#19393) 2 years ago
attachment Use a struct as test options (#19393) 2 years ago
auth Remove dependent on session auth for api/v1 routers (#19321) 2 years ago
comments Move some issue methods as functions (#19255) 2 years ago
context Add `ContextUser` to http request context (#18798) 2 years ago
cron Remove legacy unmaintained packages, refactor to support change default locale (#19308) 2 years ago
externalaccount Refactor auth package (#17962) 3 years ago
forms Move checks for pulls before merge into own function (#19271) 2 years ago
gitdiff Use a struct as test options (#19393) 2 years ago
issue Use a struct as test options (#19393) 2 years ago
lfs Update HTTP status codes to modern codes (#18063) 2 years ago
mailer Use a struct as test options (#19393) 2 years ago
migrations User specific repoID or xorm builder conditions for issue search (#19475) 2 years ago
mirror Remove `git.Command.Run` and `git.Command.RunInDir*` (#19280) 2 years ago
org Use a struct as test options (#19393) 2 years ago
packages Package registry changes (#19305) 2 years ago
pull Add commit status popup to issuelist (#19375) 2 years ago
release Use a struct as test options (#19393) 2 years ago
repository Prevent dangling archiver goroutine (#19516) 2 years ago
task Use a more general (and faster) method to sanitize URLs with credentials (#19239) 2 years ago
user Use a struct as test options (#19393) 2 years ago
webhook Use queue instead of memory queue in webhook send service (#19390) 2 years ago
wiki Use a struct as test options (#19393) 2 years ago