[#393] gc: Use defer to mark handler done
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
2613351008
commit
c6a8ce6760
1 changed files with 1 additions and 1 deletions
|
@ -146,8 +146,8 @@ func (gc *gc) listenEvents(ctx context.Context) {
|
||||||
h := v.handlers[i]
|
h := v.handlers[i]
|
||||||
|
|
||||||
err := gc.workerPool.Submit(func() {
|
err := gc.workerPool.Submit(func() {
|
||||||
|
defer v.prevGroup.Done()
|
||||||
h(runCtx, event)
|
h(runCtx, event)
|
||||||
v.prevGroup.Done()
|
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
gc.log.Warn(logs.ShardCouldNotSubmitGCJobToWorkerPool,
|
gc.log.Warn(logs.ShardCouldNotSubmitGCJobToWorkerPool,
|
||||||
|
|
Loading…
Reference in a new issue