Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit 137070b

Browse files
ZhangHongQuan-Dianrongcr22rc
authored andcommitted
[FAB-5162] java-sdk leak memory after long run
[FAB-5162] txListeners in Class channel forgot to rmeove unless items, this lead to memory leak. remoing the useless items would resolve the problem. Change-Id: I5d00e94400688bc1a31ef42bc5e1955e203e621d Signed-off-by: zhang hongquan <hongquan.zhang@dianrong.com>
1 parent b1799e3 commit 137070b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/hyperledger/fabric/sdk/Channel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,6 +2553,9 @@ void fire(BlockEvent.TransactionEvent transactionEvent) {
25532553

25542554
if (null != l) {
25552555
l.removeFirstOccurrence(this);
2556+
if (l.size() == 0) {
2557+
txListeners.remove(txID);
2558+
}
25562559
}
25572560
}
25582561
if (future.isDone()) {

0 commit comments

Comments
 (0)