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
Bug: leaking goroutines #1035
Comments
Yeah, I think Docker itself has a |
There are 2 options - either set http.client manually to docker lib, where one disables keepalive; or close it manually when you don't need it anymore. I will try to do a PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
gnomock is leaking goroutines.
To Reproduce
Add this code to kafka test (and do
go mod tidy
). This checks for any running goroutines at the end of the test.(It's possibly in other tests too, I just use this package for kafka.)
You will see many HTTP read/write loops still running around.
Expected behavior
No running goroutines after the end of the test
System (please complete the following information):
Additional context
I am using goleak to detect "forgotten" goroutines in my code. I now cannot, because gnomock's own goroutines are still running around somewhere.
I suspect some clients have keep alives turned on, and CloseIdleConnections was not called on them. I will try to dig more and make a PR.
The text was updated successfully, but these errors were encountered: