265e488ab4
The task runner prestart hooks take a `joincontext` so they have the option to exit early if either of two contexts are canceled: from killing the task or client shutdown. Some tasks exit without being shutdown from the server, so neither of the joined contexts ever gets canceled and we leak the `joincontext` (48 bytes) and its internal goroutine. This primarily impacts batch jobs and any task that fails or completes early such as non-sidecar prestart lifecycle tasks. Cancel the `joincontext` after the prestart call exits to fix the leak.
4 lines
146 B
Plaintext
4 lines
146 B
Plaintext
```release-note:bug
|
|
client: Fixed a memory and goroutine leak for batch tasks and any task that exits without being shut down from the server
|
|
```
|