Compare commits
No commits in common. "39b23c9949b7a0391e934c3e5e74e766fe6a455d" and "9d5a1e7d1b6770975eb0f1514903949567057e24" have entirely different histories.
39b23c9949
...
9d5a1e7d1b
Binary file not shown.
|
@ -94,9 +94,7 @@ public class NetworkManager {
|
|||
Packet.writePacket(var2, yee);
|
||||
yee.flush();
|
||||
try {
|
||||
if(this.isConnectionOpen()) {
|
||||
socketOutputStream.write(sendBuffer.toByteArray());
|
||||
}
|
||||
socketOutputStream.write(sendBuffer.toByteArray());
|
||||
} catch(SocketException e) {
|
||||
if (e.getMessage().contains("connection abort") || e.getMessage().contains("connection reset")) {
|
||||
this.networkShutdown("Connection reset");
|
||||
|
@ -107,9 +105,7 @@ public class NetworkManager {
|
|||
}
|
||||
}
|
||||
sendBuffer.flush();
|
||||
if(this.isConnectionOpen()) {
|
||||
socketOutputStream.flush();
|
||||
}
|
||||
socketOutputStream.flush();
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
this.sendQueueByteLength = oldSendQueue;
|
||||
|
@ -132,9 +128,7 @@ public class NetworkManager {
|
|||
Packet.writePacket(var2, yee);
|
||||
yee.flush();
|
||||
try {
|
||||
if(this.isConnectionOpen()) {
|
||||
socketOutputStream.write(sendBuffer.toByteArray());
|
||||
}
|
||||
socketOutputStream.write(sendBuffer.toByteArray());
|
||||
} catch(SocketException e) {
|
||||
if (e.getMessage().contains("connection abort") || e.getMessage().contains("connection reset")) {
|
||||
this.networkShutdown("Connection reset");
|
||||
|
@ -145,9 +139,7 @@ public class NetworkManager {
|
|||
}
|
||||
}
|
||||
sendBuffer.flush();
|
||||
if(this.isConnectionOpen()) {
|
||||
socketOutputStream.flush();
|
||||
}
|
||||
socketOutputStream.flush();
|
||||
this.chunkDataSendCounter = 50;
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -325,7 +317,7 @@ public class NetworkManager {
|
|||
}
|
||||
|
||||
boolean isConnectionOpen() {
|
||||
return networkSocket != null && networkSocket.isConnected();
|
||||
return networkSocket.isConnected();
|
||||
}
|
||||
|
||||
static Thread getReadThread(NetworkManager var0) {
|
||||
|
@ -344,7 +336,7 @@ public class NetworkManager {
|
|||
byte[] data = bytesRead == buffer.length ? buffer : new byte[bytesRead];
|
||||
System.arraycopy(buffer, 0, data, 0, data.length);
|
||||
return new ByteArrayInputStream(data);
|
||||
} catch (Throwable e) {
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user