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

Should handle connection errors more gracefully #18

Open
janosgyerik opened this issue May 5, 2016 · 1 comment
Open

Should handle connection errors more gracefully #18

janosgyerik opened this issue May 5, 2016 · 1 comment

Comments

@janosgyerik
Copy link
Owner

When connecting to an invalid channel, the app crashes. This is because the connection fails in the constructor of ConnectThread, but the caller doesn't check that, and hits an NPE when trying to use the socket.

  1. It would be better to avoid work (= initialize socket) in the constructor of ConnectThread, which is a bad practice
  2. The caller should handle problems like this gracefully
@janosgyerik
Copy link
Owner Author

Perhaps the connection can be done synchronously.

...And instead of logging an exception, the app could show more details of why the connection attempt failed.

...And offer to retry all channels.

...And offer other troubleshooting tips, or explanations, what the user could try, or why it cannot possibly work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant