Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/http: avoid leaking goroutines when TestServerGracefulClose retries
If the call to ReadString returns an error, the closure in testServerGracefulClose will return an error and retry the test with a longer timeout. If that happens, we need to wait for the conn.Write goroutine to complete so that we don't leak connections across tests. Updates #57084. Fixes #62643. Change-Id: Ia86c1bbd0a5e5d0aeccf4dfeb994c19d1fb10b00 Reviewed-on: https://go-review.googlesource.com/c/go/+/528398 Auto-Submit: Bryan Mills <[email protected]> Reviewed-by: Than McIntosh <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Bryan Mills <[email protected]> Reviewed-by: Damien Neil <[email protected]>
- Loading branch information