Fixed memory leak Chunk Compression handling. Thanks Zeerix!
Dieser Commit ist enthalten in:
Ursprung
6f8d4c3a52
Commit
e4a2177281
@ -98,7 +98,12 @@ public final class ChunkCompressionThread implements Runnable {
|
|||||||
private void addToPlayerQueueSize(EntityPlayer player, int amount) {
|
private void addToPlayerQueueSize(EntityPlayer player, int amount) {
|
||||||
synchronized (queueSizePerPlayer) {
|
synchronized (queueSizePerPlayer) {
|
||||||
Integer count = queueSizePerPlayer.get(player);
|
Integer count = queueSizePerPlayer.get(player);
|
||||||
queueSizePerPlayer.put(player, (count == null ? 0 : count) + amount);
|
amount += (count == null) ? 0 : count;
|
||||||
|
if (amount == 0) {
|
||||||
|
queueSizePerPlayer.remove(player);
|
||||||
|
} else {
|
||||||
|
queueSizePerPlayer.put(player, amount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren