Simplify reference counting in Js5Service

Spotted by Polar.

Signed-off-by: Graham <gpe@openrs2.org>
Graham 2 years ago
parent 62df015ad5
commit 9d3282ca3a
  1. 4
      game/src/main/kotlin/org/openrs2/game/net/js5/Js5Service.kt

@ -62,9 +62,7 @@ public class Js5Service @Inject constructor(
alloc.buffer().use { uncompressed ->
masterIndex.write(uncompressed)
Js5Compression.compress(uncompressed, Js5CompressionType.UNCOMPRESSED).use { compressed ->
compressed.retain()
}
Js5Compression.compress(uncompressed, Js5CompressionType.UNCOMPRESSED)
}
} else {
try {

Loading…
Cancel
Save