Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: wrong error on canceled http request #11020
when I cancel an outstanding http request (happens to be to ElasticSearch) using http.Transport.CancelRequest() I get the 'net/http: transport closed before response was received' error. But I would expect the 'net/http: request canceled' error.
go version devel +df2809f (master as of now)
Not completely understanding the net/http code this fixes it for me:
This shows the problem:
With the patch: