TCPIPConnection, ungracefull socket close detection
Brought to you by:
tdtwister
In class com.logica.smpp.TCPIPConnection @line 413 (receive() method):
bytesRead = inputStream.read(receiveBuffer, 0, bytesToRead);
returns -1 if the underling socket has been ungracefuly disconnected
causing high CPU usage while using a Reciever thread.
Solution:
add @line 423:
if (bytesRead == -1) {
throw new IOException("Ungraceful TCP socket disconnect");
}