You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been using the web socket client for a while and recently noticed that the session future doesn’t always complete on connect(). Specifically, this happens when I accidentally use ‘ws://' instead of ‘wss://', so the upgrade fails with my server responding with a 301 (and a Location rewritten to HTTPS). My code looks as follows:
var client = new WebSocketClient();
client.start();
var request = new ClientUpgradeRequest();
var sessionFuture = client.connect(delegate, serviceUri, request);
var session = sessionFuture.get();
I’d expect session to be isDone() and throw an ExecutionException. Instead, the blocking get hangs forever.
I can reproduce this on 9.4.12.RC2 from Maven Central.
The text was updated successfully, but these errors were encountered:
+ Using HttpClient fixes from #2901 to allow upgrader to be
held for entire conversation regardless of authentication
or redirect behaviors.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ Using HttpClient fixes from #2901 to allow upgrader to be
held for entire conversation regardless of authentication
or redirect behaviors.
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
…tclient-redirect
Issues #2875 and #2901 WebSocketClient Redirected Upgrade
joakime
changed the title
WebSocketClient.connect() hangs for invalid endpoint
Fix WebSocketClient.connect() hang when attempting to connect at an invalid websocket endpoint
Nov 6, 2018
I’ve been using the web socket client for a while and recently noticed that the session future doesn’t always complete on
connect()
. Specifically, this happens when I accidentally use ‘ws://' instead of ‘wss://', so the upgrade fails with my server responding with a 301 (and a Location rewritten to HTTPS). My code looks as follows:I’d expect
session
to beisDone()
and throw anExecutionException
. Instead, the blocking get hangs forever.I can reproduce this on 9.4.12.RC2 from Maven Central.
The text was updated successfully, but these errors were encountered: