fixed ConcurrentModificationException for real

This commit is contained in:
LAX1DUDE 2022-08-20 20:31:01 -07:00
parent fd317f4158
commit cbf3341320
3 changed files with 12906 additions and 12911 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -29,9 +29,7 @@ public class WorkerListenThread {
*/
public void addPlayer(NetHandler par1NetServerHandler) {
System.out.println("[Server][ADDPLAYER][" + par1NetServerHandler.getClass().getSimpleName() + "]");
synchronized(this.connections) {
this.connections.add(par1NetServerHandler);
}
this.connections.add(par1NetServerHandler);
}
public void stopListening() {
@ -81,17 +79,16 @@ public class WorkerListenThread {
* Handles all incoming connections and packets
*/
public void handleNetworkListenThread() {
synchronized(this.connections) {
deleteDeadConnections();
for (NetHandler var2 : this.connections) {
var2.handlePackets();
}
deleteDeadConnections();
deleteDeadConnections();
List<NetHandler> conns = new ArrayList(this.connections);
for (NetHandler var2 : conns) {
var2.handlePackets();
}
deleteDeadConnections();
}
public MinecraftServer getServer() {