Skip to content

Commit 0e1d6da

Browse files
author
Stephane Landelle
committed
Fix DefaultChannelPool.isTTLExpired, close AsyncHttpClient#721
1 parent 4df8d03 commit 0e1d6da

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/channel/pool/DefaultChannelPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private boolean isTTLExpired(Channel channel, long now) {
122122
return false;
123123

124124
ChannelCreation creation = channelId2Creation.get(channel.getId());
125-
return creation == null || now - creation.creationTime >= maxConnectionTTL;
125+
return creation != null && now - creation.creationTime >= maxConnectionTTL;
126126
}
127127

128128
private final class IdleChannelDetector implements TimerTask {

0 commit comments

Comments
 (0)