Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] How to access the HttpSender's HttpChannel?

Also, make sure you have an onError(Throwable cause) declared on your WebSocket endpoint.
That can often be fed with causes that occur later in the upgrade process.

Joakim Erdfelt / joakim@xxxxxxxxxxx


On Wed, Jul 29, 2020 at 1:30 PM Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
SSL / TLS failures will occur way before WebSocket is even involved.
They even occur before anything on the HTTP side of WebSocket is even attempted.

You could add a SslHandshakeListener to pay attention to those kinds of issues.

websocketClient.getHttpClient().addBean(new SslHandshakeListener()
        {
            @Override
            public void handshakeFailed(Event event, Throwable failure)
            {
                SSLEngine sslEngine = event.getSSLEngine();
                SSLSession sslSession = sslEngine.getSession();
                // etc ...
            }
        });

Joakim Erdfelt / joakim@xxxxxxxxxxx


On Wed, Jul 29, 2020 at 1:20 PM Test, Erik <Erik.Test@xxxxxxxxxxx> wrote:

Hello!

 

I have a WebSocketClient that is failing because of an SSLException in the HttpSender. That’s expected.

 

I’d like to get access to the exception so I can propagate it up to the method that calls my code but I’m not seeing a way to get that exception. I’ve been going in circles in the Jetty code for a while now so I suspect I’m misunderstanding something. Is it possible to get exceptions on the HttpSender’s HttpChannel from the WebSocketClient?

 

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users

Back to the top