Writing to a java socket channel which should be closed does not generate an exception

Posted by Dan Serfaty on Stack Overflow See other posts from Stack Overflow or by Dan Serfaty
Published on 2010-05-07T06:32:09Z Indexed on 2010/05/07 6:38 UTC
Read the original article Hit count: 284

Filed under:
|
|
|

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.

© Stack Overflow or respective owner

Related posts about java

Related posts about socket