Skip to content

Websocket is automatically reconnected event when intentionally closed #34

@AdamGrzybkowski

Description

@AdamGrzybkowski

The last PR introduced a bug where the lib tries to reconnect even when the websocket is closed intentionally by calling disconnect()

This is what is happening:

  1. disconnect() is called
  2. onConnectionClosed() is invoked
  3. reconnectTimer is scheduled
  4. reconnectTimer connects to WebSocket again

I think we should somehow distinguish disconnect() called be the user and by the library itself. This would give us an option to know wether we should still want to try to reconnect or not.

@dsrees Could you look at this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions