Skip to content

Commit 00f9f65

Browse files
Channel should be put back into pool after marking it done
Channel should be put back into pool after marking it done otherwise the same channel will become available while still processing the initial response.
1 parent 4c8dc38 commit 00f9f65

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)