Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

v3: resp.Body is not closed in s3.PutReaderWithHeader #54

Open
vitaliel opened this issue Jun 29, 2015 · 1 comment
Open

v3: resp.Body is not closed in s3.PutReaderWithHeader #54

vitaliel opened this issue Jun 29, 2015 · 1 comment

Comments

@vitaliel
Copy link

http://golang.org/pkg/net/http/#Client.Do
Callers should close resp.Body when done reading from it. If resp.Body is not closed, the Client's underlying RoundTripper (typically Transport) may not be able to re-use a persistent TCP connection to the server for a subsequent "keep-alive" request.

We encountered stale sockets for the process and at the end it fails with too many open files. It happens with s3-eu-west-1.amazonaws.com backend.

go version 1.3

axw added a commit to axw/amz that referenced this issue Jun 30, 2015
Response bodies should always be closed.

Fixes go-amz#54
@axw
Copy link

axw commented Jun 30, 2015

@vitaliel Thanks for the report.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants