Hi Simone,

Please find below:

public class ThrowawayTestJettyOnError {

    @Test
    public void test() throws Exception {

        SslContextFactory ssl = new SslContextFactory();

        ssl.setExcludeProtocols(".*");
        ssl.setIncludeProtocols();
        ssl.setIncludeCipherSuites();
        ssl.setExcludeCipherSuites(".*");

        HttpClient sslClient = new HttpClient(ssl);
        sslClient.start();

        Request request = sslClient.newRequest("https://www.ibm.com/us-en/
");
        request.send(new BufferingResponseListener(8000 * 1024) {
            @Override
            public void onComplete(Result result) {
                System.out.println("oncomplete was run");
            }
        });
        Thread.sleep(100000);
    }
}


On Mon, Oct 16, 2017 at 4:55 AM, Simone Bordet <[email protected]> wrote:

> Hi,
>
> On Mon, Oct 16, 2017 at 5:55 AM, Java CodeSmith <[email protected]>
> wrote:
> > I'm trying to catch an SSL exception when asynchronously connecting with
> a
> > client:
> >
> >  httpClient.newRequest(url).send(new BufferingResponseListener(8 *
> 1024) {
> >             @Override
> >             public void onComplete(Result result) {
> >                 if (result.isFailed()) {
> >                     Throwable t = result.getFailure();
> >                 }
> >
> >                 System.out.println("done");
> >             }
> >         });
> >
> >
> > However it appears if there's an SSL error onComplete never gets called.
>
> Do you have a reproducible test case ?
> I think this case is covered many times in our test suite, so perhaps
> it's an edge case but onComplete() must be called nevertheless.
>
> --
> Simone Bordet
> ----
> http://cometd.org
> http://webtide.com
> Developer advice, training, services and support
> from the Jetty & CometD experts.
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to