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: transport RoundTrip fails when readLoop begins first #7822
Labels
Milestone
Comments
This tends to fail quite often on OSX. Attachments:
|
The error checking won't matter. I stripped most of it because it didn't affect what was being reported from the Transport. $ ./main 2014/04/19 21:43:53 Unsolicited response received on idle HTTP channel starting with "H"; err=<nil> 2014/04/19 21:43:53 http: proxy error: net/http: transport closed before response was received I can add error checking but it won't solve the race between the readLoop starting and numExpectedResponses being incremented far later in roundTrip. |
Here is additional error checking. An interesting bit of information. If I compile with go build -a main.go, my chances are higher to hit the problem than if I just do a go build main.go. I don't know why that matters but it does. Attachments:
|
Yes, I have 1.2.1 and tip. Ok, the problem was some how I compiled in my fix into my tip and when I undid it, I didn't recompile which is why I go the two behaviors. Now that I have the original tip compiled, the problem now appears regardless of how I build. Attachments:
|
What's the bug here? The custom HTTP server in comment #6's main.go startApp actually replies before it receives a request. The numExpectedReplies++ in transport.go is already very early: it's before we even ask the writeLoop to write the request. If the server replies before we even try to write a request, the server really is speaking out of turn. Looks working as intended to me. What am I missing? Labels changed: added release-go1.3maybe, removed release-go1.3. Status changed to WaitingForReply. |
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: