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

AssertionError in WebSocketServer.removeConnection #512

Closed
greenrd opened this issue Jun 23, 2017 · 2 comments
Closed

AssertionError in WebSocketServer.removeConnection #512

greenrd opened this issue Jun 23, 2017 · 2 comments

Comments

@greenrd
Copy link

greenrd commented Jun 23, 2017

I am seeing this error occasionally:

java.lang.AssertionError: null
    at org.java_websocket.server.WebSocketServer.removeConnection(WebSocketServer.java:610)
    at org.java_websocket.server.WebSocketServer.onWebsocketClose(WebSocketServer.java:585)
    at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:492)
    at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:505)
    at org.java_websocket.WebSocketImpl.eot(WebSocketImpl.java:542)
    at org.java_websocket.SocketChannelIOHelper.read(SocketChannelIOHelper.java:17)
    at org.java_websocket.server.WebSocketServer.run(WebSocketServer.java:391)
...

which makes the server quit. From reading the code, it seems to me that this could be caused by a client closing the connection before the handshake has been sent.

@marci4
Copy link
Collaborator

marci4 commented Jun 23, 2017

Hello @greenrd,

thx for your bug report.
Could you provide some more additional infos?

  • What version of the lib are you using?
  • Are you using ws or wss?
  • In what enviroment does this happen? OS? Java version?
  • Do you know more about the client?

Greetings
marci4

marci4 added a commit to marci4/Java-WebSocket-Dev that referenced this issue Jun 27, 2017
…utdown

If an endpoint is not sending a handshake and then closing the
connection, this should not cause an AssertError resulting in a server
shutdown. See TooTallNate#512
marci4 added a commit that referenced this issue Jun 27, 2017
…utdown (#514)

* Recieving no handshake from the endpoint should not cause a server shutdown

If an endpoint is not sending a handshake and then closing the
connection, this should not cause an AssertError resulting in a server
shutdown. See #512

* Git derping around...
@marci4 marci4 added this to the Release 1.3.5 milestone Jun 27, 2017
@marci4
Copy link
Collaborator

marci4 commented Jun 27, 2017

This issue should be resolved with pull request #514.

Closing the issue!
Greetings
marci4

@marci4 marci4 closed this as completed Jun 27, 2017
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

2 participants