Writing to a java socket channel which should be closed does not generate an exception
- by Dan Serfaty
Hi all,
We have a java server that keeps a socket channel open with an Android client in order to provide push capabilities to our client application.
However, after putting the Android in airplane mode, which I expected would sever the connection, the server can still write to the SocketChannel object associated with that Android client and no error is thrown. Calling SocketChannel.isConnected() before writing to it returns true.
What are we missing? Is the handling of sockets different with mobile devices?
Thanks in advance for your help.