[#392] gc: Use defer to mark handler done

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
pull/392/head
Dmitrii Stepanov 2023-05-25 12:28:29 +03:00
parent a506da97d6
commit f866ec1399
1 changed files with 1 additions and 1 deletions

View File

@ -145,8 +145,8 @@ func (gc *gc) listenEvents(ctx context.Context) {
h := v.handlers[i]
err := gc.workerPool.Submit(func() {
defer v.prevGroup.Done()
h(runCtx, event)
v.prevGroup.Done()
})
if err != nil {
gc.log.Warn("could not submit GC job to worker pool",