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

Question about WebSocketServer.onError() #100

Closed
Steelight opened this issue Jun 5, 2012 · 2 comments
Closed

Question about WebSocketServer.onError() #100

Steelight opened this issue Jun 5, 2012 · 2 comments

Comments

@Steelight
Copy link

WebSocketServer.onError() is sometimes raised with conn == null. I originally assumed this means that the error is on the server socket itself, but I see this is not always the case. What is the correct way to distinguish error on the server from errors on accepted WebSockets? What is the correct way to handle error events on null sockets?

@Davidiusdadi
Copy link
Collaborator

There are 3 cases in which onError() will be called with conn == null

  1. If the server can not bind the ServerSocket on startup // ex == IOException
  2. on uncaught RuntimeExceptions
  3. If an IOException occures on a channel which has not yet been assigned to a websocket

@Steelight
Copy link
Author

Thank you!

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