From 4387b89026539514807ee343a32d536896c708db Mon Sep 17 00:00:00 2001 From: tanyawen Date: Mon, 30 Dec 2019 14:58:40 +0800 Subject: [PATCH] fix: factory create connection check --- src/main/java/org/csource/fastdfs/pool/ConnectionManager.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/csource/fastdfs/pool/ConnectionManager.java b/src/main/java/org/csource/fastdfs/pool/ConnectionManager.java index a481edb..68346fb 100644 --- a/src/main/java/org/csource/fastdfs/pool/ConnectionManager.java +++ b/src/main/java/org/csource/fastdfs/pool/ConnectionManager.java @@ -60,9 +60,7 @@ public class ConnectionManager { } } else if (ClientGlobal.getG_connection_pool_max_count_per_entry() == 0 || totalCount.get() < ClientGlobal.getG_connection_pool_max_count_per_entry()) { connection = ConnectionFactory.create(this.inetSocketAddress); - if (connection != null) { - totalCount.incrementAndGet(); - } + totalCount.incrementAndGet(); } else { try { if (condition.await(ClientGlobal.getG_connection_pool_max_wait_time_in_ms(), TimeUnit.MILLISECONDS)) {