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

Fix reconnection issue #414

Merged

Conversation

alvaro-delacruz-bat
Copy link
Contributor

Description of the pull request

The modification aims to reestablish the connection whenever the WebSocketConnectionDelegate triggers the webSocketDidReceiveError event due to any POSIX error, except for ENOTCONN (code 57 - Socket is not connected).

Why is the change necessary?

After thorough monitoring, we observed that whenever the WebSocketConnectionDelegate triggers the webSocketDidReceiveError event due to any POSIX error other than ENOTCONN, the socket loses its connection. However, the WebSocketConnectionDelegate fails to call the webSocketDidDisconnect method, leaving the instance in a "connected" state, even though it is effectively disconnected. This situation prevents reconnection attempts, forcing users to restart the app to establish a new connection.

@fbenevides fbenevides merged commit ee97b42 into pusher:master Aug 9, 2023
2 checks passed
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.

None yet

2 participants