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: client may remove hostclient incorrectly #1461

Conversation

Duslia
Copy link
Contributor

@Duslia Duslia commented Dec 28, 2022

The cleaner may remove hostclient unexpectedly.
I find that client will start cleaner when the first hostclient created.
image
The cleaner will remove hostclient if there is no conn in the hostclient. And cleaner will start judge logic immediately. At the same time, hostclient will create conn. So if client get the connsLock before hostclient create conn, the hostclient will be removed.
image
It may cause resource leak.

Copy link
Contributor

@li-jin-gou li-jin-gou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe the PR in more detail?

@erikdubbelboer erikdubbelboer merged commit e46afc3 into valyala:master Dec 29, 2022
@erikdubbelboer
Copy link
Collaborator

Thanks, good find!

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.

3 participants