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

Application crashes on loss of internet connectivity when starting a WebSocket connection #75

Open
rahatur opened this issue Feb 8, 2022 · 0 comments

Comments

@rahatur
Copy link

rahatur commented Feb 8, 2022

If internet connectivity is lost (even for couple of seconds) during a SignalR hub connection then a RuntimeException is thrown. Which causes the entire application to crash. Instead can we throw some sort of network exception?

Sample existing code:

if (this.state.hubConnectionState != HubConnectionState.CONNECTING) {
    return Completable.error(new RuntimeException("Connection closed while trying to connect."));
}
@rahatur rahatur changed the title Application crashes on loss of internet connectivity when starting a connection Application crashes on loss of internet connectivity when starting a EebSocket connection Feb 8, 2022
@rahatur rahatur changed the title Application crashes on loss of internet connectivity when starting a EebSocket connection Application crashes on loss of internet connectivity when starting a WebSocket connection Feb 8, 2022
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

1 participant