Skip to content

Commit

Permalink
avoid leak
Browse files Browse the repository at this point in the history
  • Loading branch information
symious committed Nov 26, 2024
1 parent 040d2ec commit d68ee2c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ private CompletableFuture<DataStreamReply> combineHeader(CompletableFuture<DataS

private CompletableFuture<DataStreamReply> writeAsyncImpl(Object data, long length, Iterable<WriteOption> options) {
if (isClosed()) {
if (data instanceof ByteBuf) {
((ByteBuf) data).release();
}
return JavaUtils.completeExceptionally(new AlreadyClosedException(
clientId + ": stream already closed, request=" + header));
}
Expand Down

0 comments on commit d68ee2c

Please sign in to comment.