-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
I used http://www.yougetsignal.com/tools/open-ports/ to check if the port of my server was open. When I'm connected with my server via simple Javascript websockets and then ping using that website, I get the following exception:
java.lang.NullPointerException at org.java_websocket.SocketChannelIOHelper.read(SocketChannelIOHelper.java:14) at org.java_websocket.server.WebSocketServer.run(WebSocketServer.java:322) at java.lang.Thread.run(Unknown Source)
That's all. So this can't be because of my own code.
I tried to solve it by adding
// Ignore if channel is null if (conn.channel == null) continue;
right above the if (SocketChannelIOHelper.read(buf, conn, conn.channel)). This prevents the server from crashing and there's no exception. However, the websocket is still closed and im unable to reconnected without restarting the server.
I'm running a TLS server if that makes any difference.