Skip to content

Commit 8259dca

Browse files
committed
Revert 91ebeba
1 parent c3a8920 commit 8259dca

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ private ChannelId channelId(Channel channel) {
6464
return Channels.getChannelId(channel);
6565
}
6666

67-
private int cleanerPeriod(int ttl) {
68-
return (int) Math.ceil(ttl / 2.0);
69-
}
70-
7167
public DefaultChannelPool(int maxIdleTime,//
7268
int connectionTtl,//
7369
Timer nettyTimer) {
@@ -78,8 +74,7 @@ public DefaultChannelPool(int maxIdleTime,//
7874
this.nettyTimer = nettyTimer;
7975
maxIdleTimeEnabled = maxIdleTime > 0;
8076

81-
// period is half
82-
cleanerPeriod = Math.min(connectionTtlEnabled ? cleanerPeriod(connectionTtl) : Integer.MAX_VALUE, maxIdleTimeEnabled ? cleanerPeriod(maxIdleTime) : Long.MAX_VALUE);
77+
cleanerPeriod = Math.min(connectionTtlEnabled ? connectionTtl : Integer.MAX_VALUE, maxIdleTimeEnabled ? maxIdleTime : Long.MAX_VALUE);
8378

8479
if (connectionTtlEnabled || maxIdleTimeEnabled)
8580
scheduleNewIdleChannelDetector(new IdleChannelDetector());

0 commit comments

Comments
 (0)