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

Prevent bugs caused by multiple Close calls #103

Merged
merged 1 commit into from Feb 19, 2017

Conversation

erikdubbelboer
Copy link
Contributor

See: golang/go#19186
When the body isn't fully read and Close is called multiple times we put the same buffer in the pool multiple times causing it to be reused by multiple goroutines at the same time.

See: golang/go#19186
When the body isn't fully read and Close is called multiple times we put
the same buffer in the pool multiple times causing it to be reused by
multiple goroutines at the same time.
@gobwas gobwas merged commit d89c33c into mailru:master Feb 19, 2017
@gobwas
Copy link
Contributor

gobwas commented Feb 19, 2017

Yeah, that was dangerous bug =)

@erikdubbelboer
Copy link
Contributor Author

We use this in productions for thousands of requests per second. When one server was a bit overloaded and http requests started timing out, causing the Go "bug" to call Close multiple times, this surfaced.

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.

None yet

2 participants