Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
A Flux subscription is not resumed after disconnecting using the "Offline" preset in Chrome dev tools.
It seems like the underlying WebSocket is reopened but onSubscriptionLost is never called which in turn means that the subscription is never reopened. I did also observe similar symptoms in real-world scenarios with other browsers but there's no easy deterministic reproduction for those since Firefox keeps WebSocket connections open when enabling "offline" mode and Safari doesn't even have an offline emulation mode.
The @Push functionality in Flow does automatically handle a corresponding situation so we're probably just missing some Atmosphere event to listen to.
Expected-behavior
Expected that the subscription could be restarted after being offline.
Reproduction
Server-side endpoint with return EndpointSubscription.of(Flux.interval(Duration.ofSeconds(1)), () -> System.out.println("Unsubscribe"))
Client-side subscription with onSubscriptionLost(() => { console.log("Lost"); return ActionOnLostSubscription.RESUBSCRIBE})
Enable the "offline" preset in Chrome dev tools. Wait for server-side log. Disable the "offline" preset. Observe that no client-side message is logged
Describe the bug
A Flux subscription is not resumed after disconnecting using the "Offline" preset in Chrome dev tools.
It seems like the underlying WebSocket is reopened but
onSubscriptionLost
is never called which in turn means that the subscription is never reopened. I did also observe similar symptoms in real-world scenarios with other browsers but there's no easy deterministic reproduction for those since Firefox keeps WebSocket connections open when enabling "offline" mode and Safari doesn't even have an offline emulation mode.The
@Push
functionality in Flow does automatically handle a corresponding situation so we're probably just missing some Atmosphere event to listen to.Expected-behavior
Expected that the subscription could be restarted after being offline.
Reproduction
return EndpointSubscription.of(Flux.interval(Duration.ofSeconds(1)), () -> System.out.println("Unsubscribe"))
onSubscriptionLost(() => { console.log("Lost"); return ActionOnLostSubscription.RESUBSCRIBE})
System Info
Originally observed with Vaadin 24.5.0.beta4