Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty httpclient threads keeping program from ending

On 12/26/2022 1:20 PM, Simone Bordet wrote:
If I uncomment the last statement in the program, which closes the solr
client (and by extension closing the httpclient), then the program ends
as expected.

Perhaps you are referring to a different version of the program?
The one linked is just a System.out, so it won't close the client.

Apologies, that isn't the newest version of the code. The latest version has a commented "sc.close();" line after that sysout. Closing the solr client shuts down the httpclient.

It is possible with Jetty's HttpClient and HTTP2Client to configure
the Executor so that the threads are daemon, but this is not exposed
by the Solr wrappers.
At this point you have to ask the Solr project to make their wrapper a
bit more configurable.

I'm a committer on the Solr project. I'm in a position to fix this if I can figure out how. I might have a solution. I created an issue in the Solr project with my patch:

https://issues.apache.org/jira/browse/SOLR-16597

Thanks for the info you provided!

Shawn


Back to the top