can anyone tell me, why I won't get an Exception, if remote socket is closing and sending FIN + ACK? Wireshark tells me, that FIN + ACK is received and ACK is sent by OS.
Here is my code. I really tried everything.
byte firstByte = (byte)instream.read();
if (firstByte == -1){
return null;
}
byte[] bytes = new byte[instream.available() + 1];
bytes[0] = firstByte;
instream.read(bytes, 1, bytes.length - 1);
instream is of Socket.getInputStream(), outstream of Socket.getOutputStream().
Connection will be closed by my 15 sec heartbeats.