-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
sometimes the server throws this exception and stop working, other clients can not connect to the server again.I guess this happens when a client close the connection as soon as it is connectted.
The exception stack trace is:
java.nio.channels.CancelledKeyException: null
at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73) ~[na:1.7.0_07]
at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:82) ~[na:1.7.0_07]
at org.java_websocket.server.WebSocketServer.onWriteDemand(WebSocketServer.java:532) ~[WebSocket-1.3.0.jar:na]
at org.java_websocket.WebSocketImpl.write(WebSocketImpl.java:635) ~[WebSocket-1.3.0.jar:na]
at org.java_websocket.WebSocketImpl.sendFrame(WebSocketImpl.java:576) ~[WebSocket-1.3.0.jar:na]
at org.java_websocket.WebSocketImpl.close(WebSocketImpl.java:407) ~[WebSocket-1.3.0.jar:na]
at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:335) ~[WebSocket-1.3.0.jar:na]
at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:157) ~[WebSocket-1.3.0.jar:na]
at org.java_websocket.server.WebSocketServer$WebSocketWorker.run(WebSocketServer.java:652) ~[WebSocket-1.3.0.jar:na]