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

client: fix goroutine leak in unreleased context #3927

Merged
merged 1 commit into from
Nov 27, 2015

Conversation

korzha
Copy link
Contributor

@korzha korzha commented Nov 27, 2015

If headerTimeout is not zero then two contexts are created but only one is released.
cancelCtx in this case is never released which leads to goroutine leak inside it.

@gyuho
Copy link
Contributor

gyuho commented Nov 27, 2015

Thanks for your contribution @nordligulv .
Could you change your PR format to this?

You can do:

client: fix goroutine leak in unreleased context

[CONTENTS]

If headerTimeout is not zero then two context are created but only one is released.
cancelCtx in this case is never released which leads to goroutine leak inside it.
@korzha korzha changed the title Fix goroutine leak in unreleased context client: fix goroutine leak in unreleased context Nov 27, 2015
@korzha
Copy link
Contributor Author

korzha commented Nov 27, 2015

Done

@xiang90
Copy link
Contributor

xiang90 commented Nov 27, 2015

Thanks! LGTM

xiang90 added a commit that referenced this pull request Nov 27, 2015
client: fix goroutine leak in unreleased context
@xiang90 xiang90 merged commit e8eb3d7 into etcd-io:master Nov 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants