Skip to content

close connection after reading the body#26

Open
ruseinov wants to merge 1 commit intobndr:masterfrom
ruseinov:feature/close-connection
Open

close connection after reading the body#26
ruseinov wants to merge 1 commit intobndr:masterfrom
ruseinov:feature/close-connection

Conversation

@ruseinov
Copy link

This closes the connection after reading from the body, otherwise too many open files error pops up when making a lot of requests.

http://craigwickesser.com/2015/01/golang-http-to-many-open-files/

You can also read the godoc that refers to Response.Close property for details:


	// Close records whether the header directed that the connection be
	// closed after reading Body. The value is advice for clients: neither
	// ReadResponse nor Response.Write ever closes a connection.
	Close bool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments