Because of a frequent losing of websoket connection between client and server, is this a good idea to use Vaadin 23 WEBSOCKET_XHR + ui.setPollInterval()
as a backup channel?
For example:
var ui = UI.getCurrent();
ui.setPollInterval(500);
listenableFuture.addCallback(result -> {
ui.access(() -> {
// some ui updates
ui.setPollInterval(-1);
ui.push();
});
Theoretically, in case the push will not deliver changes to the client, the client will pull the changes via XHR call. Does such setup make sense?