ably-js icon indicating copy to clipboard operation
ably-js copied to clipboard

Connection recovery not working

Open michalzaq12 opened this issue 1 year ago • 9 comments

Ably ver: 2.3.1

Description Realtime connection (websocket, only websocket transport provided) is not restored after network connection is lost. SDK tries to connect without success (network is already available).

My observation

  1. When a network problem occurs, checkWsConnectivity() is called, which of course fails (that's fine).
  2. checkWsConnectivity() can by called only once (WHY?) , so wsCheckResult is always false https://github.com/ably/ably-js/blob/8ba8ec29f521b18ffd16bc4fcb33004c64a7d706/src/common/lib/transport/connectionmanager.ts#L1104
  3. tryTransportWithFallbacks() is called when trying to reconnect
  4. shouldContinue() in tryTransportWithFallbacks() body always returns false, which call transport.dispose()

┆Issue is synchronized with this Jira Task by Unito

michalzaq12 avatar Aug 12 '24 16:08 michalzaq12