Skip to content

Commit ae53c0f

Browse files
committed
minor clean up
1 parent 0902f3e commit ae53c0f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

client/src/main/java/org/asynchttpclient/netty/request/body/NettyBodyBody.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import static org.asynchttpclient.util.MiscUtils.closeSilently;
1717
import io.netty.channel.Channel;
18-
import io.netty.channel.ChannelFuture;
1918
import io.netty.channel.ChannelProgressiveFuture;
2019
import io.netty.handler.codec.http.LastHttpContent;
2120
import io.netty.handler.stream.ChunkedWriteHandler;
@@ -83,13 +82,13 @@ public void onError(Throwable t) {
8382
}
8483
}
8584

86-
ChannelFuture writeFuture = channel.write(msg, channel.newProgressivePromise());
87-
writeFuture.addListener(new WriteProgressListener(future, false, getContentLength()) {
88-
public void operationComplete(ChannelProgressiveFuture cf) {
89-
closeSilently(body);
90-
super.operationComplete(cf);
91-
}
92-
});
85+
channel.write(msg, channel.newProgressivePromise())//
86+
.addListener(new WriteProgressListener(future, false, getContentLength()) {
87+
public void operationComplete(ChannelProgressiveFuture cf) {
88+
closeSilently(body);
89+
super.operationComplete(cf);
90+
}
91+
});
9392
channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT, channel.voidPromise());
9493
}
9594
}

0 commit comments

Comments
 (0)