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

Fixes #12 - iOS. Disconnect called twice #26

Merged
merged 1 commit into from
May 19, 2017

Conversation

pasn
Copy link
Contributor

@pasn pasn commented May 19, 2017

I am not sure what was the motivation behind raising OnClosed event in error handling code. In cases I saw SocketRocket raises an error followed by close event, so OnClosed event is raised two times. Maybe it would make sense to remember that OnClosed event was raised and avoid raising it before OnOpened event is called.

The more problematic case is that OnClosed event may be called at start when iPhone has no internet connection available. In such case SocketRocket raises error event with no opened event. This commit fixes this issue.

@NVentimiglia NVentimiglia merged commit 07a824e into NVentimiglia:master May 19, 2017
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

Successfully merging this pull request may close these issues.

2 participants