how can i fix this? i know it's a TCP timeout, or something related to that.
Code:
java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at Client.fillInStream(Client.java:9395)
at Client.packetProcess(Client.java:17410)
at PlayerHandler.process(PlayerHandler.java:240)
at Process.run(Process.java:31)
at java.lang.Thread.run(Unknown Source)
here is the fillInStream method (I highlighted line 9395):
Code:
private void fillInStream(int forceRead) throws java.io.IOException {
inStream.currentOffset = 0;
in.read(inStream.buffer, 0, forceRead);
}
here is packetProcess (i highlighted line 17410:
Code:
public boolean packetProcess() {
if (disconnected || destruct || !isActive || playerName == null) {
return false;
}
try {
if (in == null) {
return false;
}
int avail = in.available();
if (avail == 0) {
return false;
}
if (packetType == -1) {
packetType = in.read() & 0xff;
if (inStreamDecryption != null) {
packetType = packetType - inStreamDecryption.getNextKey() & 0xff;
}
packetSize = packetSizes[packetType];
avail--;
}
if (packetSize == -1) {
if (avail > 0) {
packetSize = in.read() & 0xff;
avail--;
} else {
return false;
}
}
if (avail < packetSize) {
return false;
}
fillInStream(packetSize);
timeOutCounter = 0;
parseIncomingPackets();
packetType = -1;
} catch (Exception ex) {
ex.printStackTrace();
disconnected = true;
}
return true;
}