Skip to content

Connection failed to reconnect despite start transport was successful #302

Description

@aliaksandrvarabyou

Hi,
in our system we have issue with reconnect - in some cases whole request string length could be greater than allowed at server (2048 now) and 400 error appears. So we've decided to avoid reconnect at all and always use connect request. To achieve this we call 'stop' for connection when him state changed to 'reconnecting', and after 1 second call 'start''. All seems work fine but disconnectTimeoutOperation not cancelled after connection started and reconnect timeout triggered. This happens because in webSocketDidOpen of SRWebSocketTransport transfer to the 'connected' state is possible only if current state is 'reconnecting' , but we have 'connecting' after stop/start.
We've fix this with manual call of 'didReconnect' after connection state did change to 'connected', but it looks like dirty hack. Can you please advise something?
Many thanks.

Activity

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