-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http: leaked Transport in tests #7847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
This reproduces with TestTransportSocketLateBinding on its own. The test ends with a call to dialGate<-true, which leads to a race between the server shutting down in a defer, and the custom Dial waiting on dialGate succeeding. When the server shuts down first, the dial() in (*Transport).dialConn returns an error and the test passes with no zombie goroutines. When the dialGate<-true unblocks the pending Dial before the server shuts down, the t.dial() succeeds and (*Transport).dialConn() runs to its end, at which point it launches a readLoop goroutine which is never closed. Depending on what this test is testing, pick one and wait for it to finish before doing the other. |
If I understood the issue I think this should fix it: https://golang.org/cl/96230044 |
CL https://golang.org/cl/96230044 mentions this issue. |
This issue was closed by revision 7e8bc47. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: