Skip to content

Stop reconnection and throw error #52

@ioana-m

Description

@ioana-m

Hi,

At the moment if the websocket cannot connect it retries indefinite. I would like to make it stop after a number of retries and throw an error so that in my project I can show a specific page.
I tried using ngstomp.connectionState.then(function () {}, function () {}); after calling the ngstomp subscribeTo but it works only for a new connection not for the current lost one, and it still tries to reconnect even if I call disconnect. So it tries to make new connections. I also tried setting the timeout -1 so that is does not reconnect at all and tried the reconnection from my project by using ngstomp.connect() but it did not work, the error function of the connectionState promise did not get called.

Could you please give me some ideas?

Thank you.

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