Skip to content

v3.2.0

Latest

Choose a tag to compare

@owenpearson owenpearson released this 20 Nov 15:42
· 4 commits to main since this release
7af6dc2

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 closeOnUnload is true, the connection now closes on the pagehide event instead of beforeunload. beforeunload also fires when the page stays open, for example when a download starts, a mailto: or tel: 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 on pagehide doesn'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. AblyHttpPlugin also reports its version to Temporal, which workers from @temporalio/worker 1.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-server now logs its decisions and connection state transitions through the logLevel and logHandler its clients are created with, such as the outcome of open(), 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