Fix goroutine leakage (#15180)

* Fix goroutine leakage

* cl: add cl entry

Co-authored-by: Seth Hoenig <shoenig@duck.com>
This commit is contained in:
stswidwinski 2022-11-17 10:47:11 -05:00 committed by GitHub
parent 74f1fe437e
commit 75f80e2fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

3
.changelog/15180.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
drivers: Fixed a bug where one goroutine was leaked per task
```

View File

@ -187,7 +187,8 @@ func (d *driverPluginClient) handleWaitTask(ctx context.Context, id string, ch c
}
// Join the passed context and the shutdown context
joinedCtx, _ := joincontext.Join(ctx, d.doneCtx)
joinedCtx, joinedCtxCancel := joincontext.Join(ctx, d.doneCtx)
defer joinedCtxCancel()
resp, err := d.client.WaitTask(joinedCtx, req)
if err != nil {