Skip to content

Commit

Permalink
Release byte buf if hash not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Nan1t committed Jan 24, 2022
1 parent 1c3cb9b commit be1fa77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/ru/nanit/limbo/protocol/PacketSnapshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public PacketSnapshot encodePacket() {

if (hashed != null) {
mappings.put(version, hashed);
continue;
} else {
hashes.put(hash, version);
versionMessages.put(version, encodedMessage.toByteArray());
}

hashes.put(hash, version);
versionMessages.put(version, encodedMessage.toByteArray());
encodedMessage.release();
}

Expand Down

0 comments on commit be1fa77

Please sign in to comment.