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 03:13:11 UTC
[cxf] 02/02: [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 3.2.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit f0ac9a97e827991355c80a65efa64d1e6b822f6c
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
(cherry picked from commit bcf43396043673166ca88093e8d8597d1504888b)
---
.../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