You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2018/10/26 02:48:29 UTC
[cxf] branch master updated: [CXF-7883]ensure connectionMaxIdle
kick in when connectionTTL is 0
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/master by this push:
new bcf4339 [CXF-7883]ensure connectionMaxIdle kick in when connectionTTL is 0
bcf4339 is described below
commit bcf43396043673166ca88093e8d8597d1504888b
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Fri Oct 26 10:48:15 2018 +0800
[CXF-7883]ensure connectionMaxIdle kick in when connectionTTL is 0
---
.../apache/cxf/transport/http/asyncclient/AsyncHTTPConduitFactory.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduitFactory.java b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduitFactory.java
index 15445bc..ee4db08 100644
--- a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduitFactory.java
+++ b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduitFactory.java
@@ -415,7 +415,8 @@ public class AsyncHTTPConduitFactory implements HTTPConduitFactory {
// not just when a connection becomes available
connMgr.validatePendingRequests();
- if (connectionMaxIdle > 0 && System.currentTimeMillis() >= nextIdleCheck) {
+ if (connectionTTL == 0
+ && connectionMaxIdle > 0 && System.currentTimeMillis() >= nextIdleCheck) {
nextIdleCheck += connectionMaxIdle;
// close connections
// that have been idle longer than specified connectionMaxIdle