Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] jetty client socket fd leak issue

Hi Jan,

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


Back to the top