Skip to content
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: use of closed network connection #4914

Closed
niemeyer opened this issue Feb 25, 2013 · 3 comments
Closed

net/http: use of closed network connection #4914

niemeyer opened this issue Feb 25, 2013 · 3 comments

Comments

@niemeyer
Copy link
Contributor

An http.Client fails to download files with this error:

    use of closed network connection

Debugging the issue shows that indeed the net/http package is sending a RST packet while
the remote side is still delivering data, so apparently the connection is being locally
closed.
@bradfitz
Copy link
Contributor

Comment 1:

This isn't actionable without more details or a repro.

Status changed to WaitingForReply.

@niemeyer
Copy link
Contributor Author

Comment 2:

The 1.0.2 package that was shipped in Debian and Ubuntu has a cherry-picked patch from
the development tree due to this issue:
    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683421
Someone got the patch from here:
    https://golang.org/cl/6201044
Unfortunately, though, that patch was broken. Right after submission
there's a comment saying:
    This code breaks Client.Get() on non-persistent ("Connection: close")
    connections. Response.Body returns error("use of closed network
connection").
And a patch to fix that immediately followed in a different CL:
    https://golang.org/cl/6211069
That didn't make into the Debian package for several months, which means http GETs have
been broken there and in Ubuntu for that time.

Status changed to Fixed.

@niemeyer
Copy link
Contributor Author

Comment 3:

Brad, this is a for-the-record issue. You are too fast.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants