Kong / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
http://kong.github.io/unirest-java/
MIT License
2.58k stars 591 forks source link

Thread leaking issue not getting away after upgrading from 1.4.9 to 3.13.6 #443

Closed jlarroque closed 2 years ago

jlarroque commented 2 years ago

Describe the bug I have updated my code to use Unirest 3.13.6 version, but I still see that threads created by Unirest don't go away correctly. Should I do any specific configuration action for this to work? My understanding was that this was solved in Unirest 2. But I still see a bunch of threads related to it.

To Reproduce Steps to reproduce the behavior: String queryWithHost = instanceURL + query; GetRequest request = Unirest.get(queryWithHost);

Expected behavior Threads created by Unirest should go away sometime after that they were created.

Screenshots image image image

Environmental Data:

Additional context Add any other context about the problem here.

ryber commented 2 years ago

That class doesn't even exist in 3.13.6, not sure where you are getting it or where it would be started, but it's not Unirest 3.13.6

ryber commented 2 years ago

BTW, there are namespace changes from 1 to 3, so I'm guessing you are actually still using 1, which absolutely has thread leaks

bcmyguest1 commented 2 years ago

Check the dependencies you are using in the project. If you are using maven, the command is

mvn dependency:tree
jlarroque commented 2 years ago

Thank you for your quick answers. After checking the code, I found out that there was another dependency that was using Unirest 1.4.9 under the hood.