Michal Čudrnák
2018-08-30 20:51:52 UTC
Iâve been using the web socket client for a while and recently noticed that the session future doesnât always get completed on connect(). Specifically, this happens when I accidentally use âws://' <ws://'/> instead of âwss://' <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.
Can anyone help? I can reproduce this on 9.4.12.RC2 from Maven Central.
Cheers
Michal
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.
Can anyone help? I can reproduce this on 9.4.12.RC2 from Maven Central.
Cheers
Michal