Skip to content

Commit

Permalink
Fix messageQueue release message issue. (apache#16155)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoboy- authored Jun 21, 2022
1 parent 8869d8c commit 141c440
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -726,19 +726,17 @@ public boolean isNull(int field) {
public void close() {
log.info("Closing cursor record");

if (currentMessage != null) {
currentMessage.release();
}

if (messageQueue != null) {
messageQueue.drain(RawMessage::release);
}

if (deserializeEntries != null) {
deserializeEntries.close().whenComplete((r, t) -> {
if (entryQueue != null) {
entryQueue.drain(Entry::release);
}
if (messageQueue != null) {
messageQueue.drain(RawMessage::release);
}
if (currentMessage != null) {
currentMessage.release();
}
});
}

Expand Down

0 comments on commit 141c440

Please sign in to comment.