mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Fix goroutine leakage (#15180)
* Fix goroutine leakage * cl: add cl entry Co-authored-by: Seth Hoenig <shoenig@duck.com>
This commit is contained in:
3
.changelog/15180.txt
Normal file
3
.changelog/15180.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
```release-note:bug
|
||||||
|
drivers: Fixed a bug where one goroutine was leaked per task
|
||||||
|
```
|
||||||
@@ -187,7 +187,8 @@ func (d *driverPluginClient) handleWaitTask(ctx context.Context, id string, ch c
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Join the passed context and the shutdown context
|
// 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)
|
resp, err := d.client.WaitTask(joinedCtx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user