Calling readNBytes on InputStream of pseudo tcp socket instance, causes it to hang in loop forever.
I think this behavior is caused by PseudoTcpInputStream#read(byte[], int, int) implementation which doesn't know how to handle length of zero, i.e. when length of zero is provided it loops forever because in these lines:
|
read = pseudoTcp.recv(buffer, offset, length); |
read = pseudoTcp.recv(buffer, offset, length);
if (logger.isLoggable(Level.FINER))
{
logger.log(Level.FINER,
"Read Recv read count: " + read);
}
if (read > 0)
{
return read;
}
read is never more than zero, if length=0
Calling readNBytes on InputStream of pseudo tcp socket instance, causes it to hang in loop forever.
I think this behavior is caused by
PseudoTcpInputStream#read(byte[], int, int)implementation which doesn't know how to handle length of zero, i.e. when length of zero is provided it loops forever because in these lines:ice4j/src/main/java/org/ice4j/pseudotcp/PseudoTcpSocketImpl.java
Line 922 in 15981cf
read is never more than zero, if length=0