Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Thread leak in client on "clientId already registered" Error #141

Closed
tjmcarthur opened this issue Sep 20, 2019 · 3 comments
Closed

Thread leak in client on "clientId already registered" Error #141

tjmcarthur opened this issue Sep 20, 2019 · 3 comments

Comments

@tjmcarthur
Copy link
Contributor

I have a second instance of my application as hot standby in a registration loop, waiting for a valid connection. The standby instance OOMs every 90 minutes to due to a thread leak. The close method in StreamingConnectionImpl.java throws a NPE setting up the for loop
for(AckClousre ac : this.pubAckMap.values()) {
since pubAckMap is null, this cause the method to bail leaving the dispatchers open with active threads.

@sasbury
Copy link
Contributor

sasbury commented Sep 20, 2019

I will take a look. If you have a chance to put a PR together it might be faster, but I should be able to fix this in the next release. Sounds like we just need to skip that loop if the value is null, or pre-alloc the map.

@tjmcarthur
Copy link
Contributor Author

ok, I will code up a fix and submit a PR this morning

@sasbury
Copy link
Contributor

sasbury commented Sep 26, 2019

fixed in 2.2.3 going out today

@sasbury sasbury closed this as completed Sep 26, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants