mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-13 17:37:58 -04:00
fix packet queue bug, name threads
This commit is contained in:
parent
1b13b4981b
commit
6d1a7052ae
@ -69,6 +69,7 @@ public class Log {
|
||||
|
||||
}
|
||||
});
|
||||
logThread.setName("Log-Thread");
|
||||
logThread.start();
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ public class Connection {
|
||||
|
||||
private void startHandlingThread() {
|
||||
handleThread = new Thread(() -> {
|
||||
while (getConnectionState() != ConnectionState.DISCONNECTED) {
|
||||
while (getConnectionState() != ConnectionState.DISCONNECTING) {
|
||||
while (handlingQueue.size() > 0) {
|
||||
try {
|
||||
handlingQueue.get(0).log();
|
||||
@ -182,6 +182,7 @@ public class Connection {
|
||||
}
|
||||
}
|
||||
});
|
||||
handleThread.setName("Handle-Thread");
|
||||
handleThread.start();
|
||||
}
|
||||
|
||||
|
@ -119,6 +119,7 @@ public class Network {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
socketThread.setName("Socket-Thread");
|
||||
socketThread.start();
|
||||
}
|
||||
|
||||
@ -129,7 +130,7 @@ public class Network {
|
||||
// sleep 1 ms
|
||||
packetThread = new Thread(() -> {
|
||||
// compressed data, makes packets to binary data
|
||||
while (connection.getConnectionState() != ConnectionState.DISCONNECTED) {
|
||||
while (connection.getConnectionState() != ConnectionState.DISCONNECTING) {
|
||||
|
||||
while (queue.size() > 0) {
|
||||
ServerboundPacket p = queue.get(0);
|
||||
@ -242,6 +243,7 @@ public class Network {
|
||||
|
||||
}
|
||||
});
|
||||
packetThread.setName("Packet-Thread");
|
||||
packetThread.start();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user