Skip to content

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

Open

Description

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.

Activity

  1. compulim commented on Dec 4, 2023

    @compulim
    Collaborator

    Hi Michael Trexler (@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions