mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 19:07:40 +01:00
Fixed memory leak Chunk Compression handling. Thanks Zeerix!
This commit is contained in:
parent
6f8d4c3a52
commit
e4a2177281
@ -98,7 +98,12 @@ public final class ChunkCompressionThread implements Runnable {
|
||||
private void addToPlayerQueueSize(EntityPlayer player, int amount) {
|
||||
synchronized (queueSizePerPlayer) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user