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

Fix a goroutine-leak in HTTP keep-alive #116

Merged
merged 1 commit into from
Mar 1, 2016
Merged

Conversation

yugui
Copy link
Member

@yugui yugui commented Feb 26, 2016

CloseNotifier channel is triggered only if the connection is closed,
the goroutines for earlier requests used to remain until the last
request closes the connection when HTTP keep-alive is used.

This commit terminates the groutine as soon as its corresponding HTTP
request is done.

I'm not sure but it might fix #115.

@yugui yugui changed the title Fix a goroutine-leak in HTTP kee-palive Fix a goroutine-leak in HTTP keep-alive Feb 26, 2016
@yugui yugui force-pushed the fix/goroutine-leak branch from 811d361 to 0de390c Compare February 26, 2016 05:15
@kazegusuri
Copy link
Contributor

LGTM. I'm using this branch in my env and confirmed it fixed goroutine leak.

CloseNotifier channel is triggered only if the connection is closed,
the goroutines for earlier requests used to remain until the last
request closes the connection when HTTP keep-alive is used.

This commit terminates the groutine as soon as its corresponding HTTP
request is done.
@yugui yugui force-pushed the fix/goroutine-leak branch from a36fe31 to 6f975cf Compare March 1, 2016 23:40
yugui added a commit that referenced this pull request Mar 1, 2016
Fix a goroutine-leak in HTTP keep-alive
@yugui yugui merged commit 67e1374 into master Mar 1, 2016
@yugui yugui deleted the fix/goroutine-leak branch April 18, 2016 05:10
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.

Runtime panic with CloseNotify
2 participants