Skip to content

Commit

Permalink
Fix goroutine leakage (#15180)
Browse files Browse the repository at this point in the history
* Fix goroutine leakage

* cl: add cl entry

Co-authored-by: Seth Hoenig <shoenig@duck.com>
  • Loading branch information
stswidwinski and shoenig committed Nov 17, 2022
1 parent 732adae commit d16a2c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/15180.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
drivers: Fixed a bug where one goroutine was leaked per task
```
3 changes: 2 additions & 1 deletion plugins/drivers/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d16a2c9

Please sign in to comment.