Skip to content

Commit ecdbb72

Browse files
author
Stephane Landelle
committed
Merge pull request AsyncHttpClient#845 from maxpower-artvandelay/master
Netty HttpProtocol.finishUpdate should offer channel back to pool after markAsDone
2 parents adc0354 + 00f9f65 commit ecdbb72

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,13 @@ private void addType3NTLMAuthorizationHeader(String auth, FluentCaseInsensitiveS
189189

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

192+
markAsDone(future, channel);
193+
192194
boolean keepAlive = future.isKeepAlive();
193195
if (expectOtherChunks && keepAlive)
194196
channelManager.drainChannelAndOffer(channel, future);
195197
else
196198
channelManager.tryToOfferChannelToPool(channel, keepAlive, future.getPartitionId());
197-
markAsDone(future, channel);
198199
}
199200

200201
private boolean updateBodyAndInterrupt(NettyResponseFuture<?> future, AsyncHandler<?> handler, NettyResponseBodyPart bodyPart)

0 commit comments

Comments
 (0)