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

close is not clean #51

Open
troolee opened this issue Nov 25, 2016 · 3 comments
Open

close is not clean #51

troolee opened this issue Nov 25, 2016 · 3 comments

Comments

@troolee
Copy link

troolee commented Nov 25, 2016

Hi afrad,

Using lib with ionic 2 app (tested with ionic serve). When I call close method websocket doesn't recognize this as 'clean' close. onCloseHandler handler receives an event with code == 1005. So the lib is trying to reconnect.

If it's a feature, not a bug, then how can I close the socket without auto reconnect? (I do need auto reconnect if connection is dropped by network issues, etc)

Thank you.

@Lyoko-Jeremie
Copy link
Contributor

now reconnect will work on closed on status code not 1000.
maybe we can add a option to set when to reconnect ?
i think this way may be help you? (∩_∩)

@troolee
Copy link
Author

troolee commented Nov 25, 2016

Thank you for response. I think call back to decide if it's clean or not would be helpful. Or just assume that if connection was closed by close method it's clean. What do you think?

@Lyoko-Jeremie
Copy link
Contributor

i think you may like this #52

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