Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
progress: fix leak of pipe goroutine from MultiReader
In the case where the context provided to MultiReader.Reader is cancelled, the writer will be deleted. Before this, closeWriter was not called in that codepath, when meant that MultiReader.handle would never see the writer and never close it. * I don't have an isolated repro, but when running a few hundred of Dagger's tests I was seeing several thousand goroutines blocked on waiting for the progress pipe's context to be done. Now, we just call closeWriter when it gets deleted so that the pipe's goroutine doesn't leak. * After this change, those thousands of leaked goroutines are entirely gone. Signed-off-by: Erik Sipsma <[email protected]>
- Loading branch information