Skip to content

Commit 3ab0b18

Browse files
committed
Netty HttpProtocol.finishUpdate should offer channel back to pool after markAsDone, close AsyncHttpClient#844
1 parent ecdbb72 commit 3ab0b18

File tree

1 file changed

+2
-1
lines changed
  • providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/handler

1 file changed

+2
-1
lines changed

providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/handler/HttpProtocol.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,13 @@ private void addType3NTLMAuthorizationHeader(String authenticateHeader, FluentCa
190190

191191
private void finishUpdate(final NettyResponseFuture<?> future, Channel channel, boolean expectOtherChunks) throws IOException {
192192

193+
markAsDone(future, channel);
194+
193195
boolean keepAlive = future.isKeepAlive();
194196
if (expectOtherChunks && keepAlive)
195197
channelManager.drainChannelAndOffer(channel, future);
196198
else
197199
channelManager.tryToOfferChannelToPool(channel, keepAlive, future.getPartitionId());
198-
markAsDone(future, channel);
199200
}
200201

201202
private boolean updateBodyAndInterrupt(NettyResponseFuture<?> future, AsyncHandler<?> handler, NettyResponseBodyPart bodyPart) throws Exception {

0 commit comments

Comments
 (0)