You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.ning.http.client.AsyncHttpClientConfigBean doesn't use
com.ning.http.client.AsyncHttpClientConfig.Builder thus doesn't pick
many default values, unluckily maxConnectionLifeTimeInMs is one of them,
it's wrongly initialized to zero instead of -1, this bug will make
org.asynchttpclient.providers.netty.channel.DefaultChannelPool.offer() close
the cached http connection too early because "createTime + maxConnectionLifeTimeInMs < millisTime()".
public boolean offer(String uri, Channel channel) {
if (closed.get())
return false;
if (!sslConnectionPoolEnabled && uri.startsWith("https")) {
return false;
}
Long createTime = channel2CreationDate.get(channel);
if (createTime == null) {
channel2CreationDate.putIfAbsent(channel, millisTime());
===> } else if (maxConnectionLifeTimeInMs != -1 && (createTime + maxConnectionLifeTimeInMs) < millisTime()) {
log.debug("Channel {} expired", channel);
return false;
}
0 commit comments