Skip to content

Commit 80c8551

Browse files
committed
ensures frame is released
Signed-off-by: Oleh Dokuka <[email protected]> Signed-off-by: Oleh Dokuka <[email protected]>
1 parent 3892a58 commit 80c8551

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rsocket-transport-local/src/main/java/io/rsocket/transport/local/LocalDuplexConnection.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,11 @@ public void onSubscribe(Subscription s) {
136136

137137
@Override
138138
public void onNext(ByteBuf buf) {
139-
actual.onNext(buf);
140-
buf.release();
139+
try {
140+
actual.onNext(buf);
141+
} finally {
142+
buf.release();
143+
}
141144
}
142145

143146
@Override

0 commit comments

Comments
 (0)