Handles TCP socket when closed by remote host (which previously triggers numerous illegal length excpetion).
This commit is contained in:
parent
757aef02d4
commit
139ac8a12f
@ -888,8 +888,8 @@ public class DelegatingSocket
|
|||||||
// hole punch packet.
|
// hole punch packet.
|
||||||
if(fb == -1 || sb == -1)
|
if(fb == -1 || sb == -1)
|
||||||
{
|
{
|
||||||
p.setLength(-1);
|
p.setLength(0);
|
||||||
return;
|
throw new SocketException("read failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
int desiredLength = (((fb & 0xff) << 8) | (sb & 0xff));
|
int desiredLength = (((fb & 0xff) << 8) | (sb & 0xff));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user