gitea/cmd
zeripath c58bc4bf80
Prevent timer leaks in Workerpool and others ()
There is a potential memory leak in `Workerpool` due to the intricacies of
`time.Timer` stopping.

Whenever a `time.Timer` is `Stop`ped its channel must be cleared using a
`select` if the result of the `Stop()` is `false`.

Unfortunately in `Workerpool` these were checked the wrong way round.

However, there were a few other places that were not being checked.

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
..
admin.go make `gitea admin auth list` formatting configurable ()
admin_auth_ldap.go Add restricted user filter to LDAP authentication ()
admin_auth_ldap_test.go Add restricted user filter to LDAP authentication ()
cert.go Add golangci ()
cmd.go Move database settings from models to setting ()
convert.go Move database settings from models to setting ()
doctor.go Return error for authorized_keys and mergebase problems ()
dump.go cmd: dump: check value of skip-repository flag ()
embedded.go Implement "embedded" command to extract static resources ()
embedded_stub.go Implement "embedded" command to extract static resources ()
generate.go Rename LFS_JWT_SECRET to include OAUTH2 as well ()
hook.go Prevent timer leaks in Workerpool and others ()
keys.go Add debug option to serv to help debug problems ()
manager.go Queue: Make WorkerPools and Queues flushable ()
migrate.go Graceful: Xorm, RepoIndexer, Cron and Others ()
serv.go Multiple LFS improvements ()
web.go Graceful: Xorm, RepoIndexer, Cron and Others ()
web_graceful.go Graceful: Xorm, RepoIndexer, Cron and Others ()