Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

networkInformation: Switching network type, then switching back again, results in RECONNECT_REJECTED #416

Open
miketrexler opened this issue Nov 8, 2023 · 1 comment

Comments

@miketrexler
Copy link

Version: v0.15.5

Steps to reproduce:

  1. Within the networkInformation object, set the type to "wifi". Wait for connection to resume as expected.
  2. Within the networkInformation object, set the type to "cellular". Wait for connection to resume as expected.
  3. Within the networkInformation object, set the type to "wifi".

Then, Observe:

  1. After attempting a reconnection to "wifi" for the second time, a DIRECT_LINE/RECONNECT_REJECTED error is thrown, with a payload of: Error: Failed to reconnect. DirectLineJS returned 4.\n at reconnectSaga$
  2. The webchat ui is disabled, while displaying an "Unable to Connect" error message.
@compulim
Copy link
Collaborator

compulim commented Dec 4, 2023

Hi @miketrexler,

DirectLineJS ASE adapter (a.k.a. DLASE) will reconnect up to 3 times. When a stable connection is detected, it will reset the retry counter back to 3.

DLASE consider the connection is stable if the connection did not close within a minute after the connection is established.

In other words, if connection is flaky and it keeps reconnecting quickly. Despite there maybe successful connection in between, it may fail to reconnect after 3 times.

I am open to suggestions on how the reconnect can be customized (retry times, backoff, stabilization, etc.) Currently, it is hardcoded here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants