Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task runner: fix goroutine leak in prestart hook
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. Batch jobs (and any failed job) 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. Cancel the `joincontext` after the prestart call exits to fix the leak.
- Loading branch information