File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
client/src/main/java/org/asynchttpclient/netty/request/body Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 1515
1616import static org .asynchttpclient .util .MiscUtils .closeSilently ;
1717import io .netty .channel .Channel ;
18- import io .netty .channel .ChannelFuture ;
1918import io .netty .channel .ChannelProgressiveFuture ;
2019import io .netty .handler .codec .http .LastHttpContent ;
2120import 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}
You can’t perform that action at this time.
0 commit comments