I have been using the autobahn library for an Android App that I am developing for smartphones.
I have been watching it over the last few months and it appears that the websocket connection ‘goes away’ without any notification to the onClose method of the mConnection object.
I have a tomcat7 server that broadcasts the server time every 30 seconds to each Android device that is connected to the server. On the smartphone it keeps track of the server times and triggers an event if too much time goes by since last incoming server time.
If too much time passes then I test the websocket by testing the mConnection.isConnected() and it always returns true even when I specifically try to use the mConnection to request something from server, which never returns.
I see in the System.out.print that an error is being thrown about tavendo working on a dead thread.
Is there a solution for this?
More importantly, what is the best way of knowing within 2-3 seconds that the websocket is not actually connected or is in the process of trying to automatically reconnect itself (does it actively try to reconnect automatically?)?