Skip to content

Commit

Permalink
Close buffers passed to the MessageToMessageEncoder.encodeAndClose me…
Browse files Browse the repository at this point in the history
…thod in NettyOutboundTest
  • Loading branch information
pderop committed Sep 16, 2022
1 parent 7b44ace commit 618e866
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -163,6 +163,7 @@ protected void encodeAndClose(ChannelHandlerContext ctx, Buffer msg,
List<Object> out) {
clearMessages.add(msg.readCharSequence(msg.readableBytes(), StandardCharsets.UTF_8));
out.add(msg.split());
msg.close();
}
},
//transform the ChunkedFile into Buffer chunks:
Expand Down Expand Up @@ -255,6 +256,7 @@ void sendFileWithForceChunkedFileUsesStrategyChunks()
protected void encodeAndClose(ChannelHandlerContext ctx, Buffer msg,
List<Object> out) {
out.add(msg.readCharSequence(msg.readableBytes(), StandardCharsets.UTF_8));
msg.close();
}
},
//transform the ChunkedFile into Buffer chunks:
Expand Down Expand Up @@ -338,4 +340,4 @@ static <S> Mono<Void> mockSendUsing(Connection c, Callable<? extends S> sourceIn
sourceCleanup
);
}
}
}

0 comments on commit 618e866

Please sign in to comment.