Skip to content

Commit 094fcc0

Browse files
author
Stephane Landelle
committed
Only trigger IdleChannelDetector when maxIdleTime is > 0, close AsyncHttpClient#566
1 parent c90cf86 commit 094fcc0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/DefaultChannelPool.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ public DefaultChannelPool(//
7272
this.maxIdleTime = maxIdleTime;
7373
this.maxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs;
7474
this.nettyTimer = nettyTimer;
75-
scheduleNewIdleChannelDetector(new IdleChannelDetector());
75+
if (maxIdleTime > 0L) {
76+
scheduleNewIdleChannelDetector(new IdleChannelDetector());
77+
}
7678
}
7779

7880
private void scheduleNewIdleChannelDetector(TimerTask task) {

0 commit comments

Comments
 (0)