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
net/http/httptest: http.Get succeed after Server.Close #12781
Comments
CL https://golang.org/cl/15151 mentions this issue. |
CL https://golang.org/cl/15151 focus on Server.Close race. But the second example shows Listener.Accept succeed after Listener.Close, I'm not sure if it is right. Listener.Close: https://github.com/golang/go/blob/go1.5.1/src/net/http/httptest/server.go#L167 example code: https://play.golang.org/p/FcpbVEf_HI (detect deadlock on play.golang.org, but hit "unexpected get succeed" on my server)
go version: go version go1.5.1 linux/amd64 |
@carter2000 latest commit (a35d7b3) on CL https://golang.org/cl/15151 fixes your examples for me. |
After close a httptest.Server, the following request should failed, but sometimes it succeed.
example code: https://play.golang.org/p/IFv6BKjRgt
more simple one: https://play.golang.org/p/FcpbVEf_HI (detect deadlock on play.golang.org, but hit "unexpected get succeed" on my server)
go version: go version go1.5.1 linux/amd64
The text was updated successfully, but these errors were encountered: