A third party application providing WebSocketServer connectivity may drop the connection without properly closing it (ie: when closing the program), wich in turn, the jWebSocketClient does raises the Close event, but the underlying Jetty WebSocketClient object doesn't actually close. That leads to the program not being able to gracefully exit unless ExitApplication is called. There is no way to close that object directly from the jWebSocketClient object methods and it easily triggers a Null object error when trying to close it again.
This behavior has been observed with versions 1.10 and 1.13 of the jWebSocketClient library.
The objects created with this library should be able to handle this situation since no one can predict how a 3rd party server might close the client connection; therefore the client should be able to handle it by itself.
There is a workaround to this issue using JavaObject, by getting the Jetty WebSocketClient object from the jWebSocketClient object and closing it manually, still, the WSC should be able to propperly close before the Close event is raised.
This behavior has been observed with versions 1.10 and 1.13 of the jWebSocketClient library.
The objects created with this library should be able to handle this situation since no one can predict how a 3rd party server might close the client connection; therefore the client should be able to handle it by itself.
There is a workaround to this issue using JavaObject, by getting the Jetty WebSocketClient object from the jWebSocketClient object and closing it manually, still, the WSC should be able to propperly close before the Close event is raised.