Repository navigation
This release changes when a browser client closes its connection on unload, and builds on the server-side features from 3.1.0. With closeOnUnload, the connection no longer closes when the page stays open, such as when a download starts. Temporal activities now stop their Ably requests when Temporal cancels them or times them out, and the Temporal plugin and the realtime channel pool log what you need to diagnose them.
What's Changed
- When
closeOnUnloadistrue, the connection now closes on thepagehideevent instead ofbeforeunload.beforeunloadalso fires when the page stays open, for example when a download starts, amailto:ortel:link is followed, or the user cancels a "Leave site?" prompt, which closed the connection and detached its channels. In Firefox, the close request sent onpagehidedoesn't reach Ably when the page unloads, so a Firefox user who navigates away, reloads or closes the tab now leaves presence after 15 seconds rather than immediately #2351 - The Temporal plugin's activities now abandon their Ably requests, including any fallback hosts and token renewal still to come, once Temporal cancels the activity or times out the attempt, and fail as cancelled. When the activity has a
heartbeatTimeout, it heartbeats while a request is outstanding, so slow requests are not timed out and cancellations from the workflow reach the activity.AblyHttpPluginalso reports its version to Temporal, which workers from@temporalio/worker1.26.0 include in their heartbeats #2348 - The Temporal plugin logs a warning through the activity's logger when a retried activity may make Ably apply a call more than once: when the call isn't deduplicated by Ably, or when the retry comes more than 2 minutes after the activity was first scheduled. See the Logging section of
docs/temporal.md#2347 - The realtime channel pool in
@ably/pubsub-servernow logs its decisions and connection state transitions through thelogLevelandlogHandlerits clients are created with, such as the outcome ofopen(), reconnects of failed clients, and when every client is suspended or failed. Each line about one client is tagged with that client's index in the pool #2346