[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-dev] jetty client socket fd leak issue
|
Hi All,
Even if I have code "hc.setConnectBlocking(false)" there or not,
jetty client socket fd always leaks for the following URL.
After "
ce.waitForDone()", there will left 3 socket fds.
The issue exists in both Jetty-7.5 and Jetty-8.0.
Anyone have ideas? how to fix or work around?
Thanks.
----
I reproduced the issue with the following code.
The key code is "hc.setConnectBlocking(false)".
If I comment out this code line, I will get "UnknownHostException",
or else, I will get "UnresolvedAddressException".
HttpClient hc = new HttpClient();
hc.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
hc.setMaxConnectionsPerAddress(1);
hc.setConnectBlocking(false);
hc.setIdleTimeout(10 * 1000L);
hc.setThreadPool(new QueuedThreadPool(3));
hc.setTimeout(60000);
hc.start();
ContentExchange ce = new ContentExchange();
ce.setURL("http://com.br");
hc.send(ce);
log.info("sended, waitForDone");
ce.waitForDone();
log.info("done, sleeping");
Thread.sleep(100*1000L);
Any ideas?
Thanks.
Regards,
Junwei