1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-09 17:24:43 +00:00
zeripath c58bc4bf80
Prevent timer leaks in Workerpool and others (#11333)
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>
2020-05-08 16:46:05 +01:00
..
2020-04-05 07:20:50 +01:00
2020-04-05 07:20:50 +01:00
2019-06-12 15:41:28 -04:00
2020-04-05 07:20:50 +01:00
2018-11-04 22:20:00 -05:00
2019-06-12 15:41:28 -04:00
2020-04-05 07:20:50 +01:00
2019-11-22 08:03:45 +00:00
2019-03-08 11:42:50 -05:00
2019-08-23 12:40:29 -04:00
2020-05-07 22:49:00 +01:00
2019-08-23 12:40:29 -04:00
2019-08-17 13:10:17 +03:00
2020-04-05 07:20:50 +01:00
2020-03-28 15:09:55 +02:00