Skip to content

Commit 8947d61

Browse files
committed
Merge pull request AsyncHttpClient#188 from hmashlah/ahc-1.7.x
-fix: Change the delay of the reaperFuture to be the minimum of the requ...
2 parents ed3078c + a703e2b commit 8947d61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ public void operationComplete(ChannelFuture cf) {
564564

565565
try {
566566
future.touch();
567-
int delay = requestTimeout(config, future.getRequest().getPerRequestConfig());
567+
int delay = Math.min(config.getIdleConnectionTimeoutInMs(), requestTimeout(config, future.getRequest().getPerRequestConfig()));
568568
if (delay != -1 && !future.isDone() && !future.isCancelled()) {
569569
ReaperFuture reaperFuture = new ReaperFuture(future);
570570
Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, delay, TimeUnit.MILLISECONDS);

0 commit comments

Comments
 (0)