From 1b99e59cf7179ade25f6e80a812b70f973df1a14 Mon Sep 17 00:00:00 2001 From: tanyawen Date: Mon, 30 Dec 2019 18:28:00 +0800 Subject: [PATCH] fix: trim host --- src/main/java/org/csource/fastdfs/pool/ConnectionManager.java | 2 +- src/main/java/org/csource/fastdfs/pool/ConnectionPool.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/csource/fastdfs/pool/ConnectionManager.java b/src/main/java/org/csource/fastdfs/pool/ConnectionManager.java index 68346fb..7e840d3 100644 --- a/src/main/java/org/csource/fastdfs/pool/ConnectionManager.java +++ b/src/main/java/org/csource/fastdfs/pool/ConnectionManager.java @@ -36,7 +36,7 @@ public class ConnectionManager { /** * free connections */ - private volatile ConcurrentLinkedQueue freeConnections = new ConcurrentLinkedQueue(); + private volatile LinkedList freeConnections = new LinkedList(); private ConnectionManager() { diff --git a/src/main/java/org/csource/fastdfs/pool/ConnectionPool.java b/src/main/java/org/csource/fastdfs/pool/ConnectionPool.java index 0679fbc..b643adf 100644 --- a/src/main/java/org/csource/fastdfs/pool/ConnectionPool.java +++ b/src/main/java/org/csource/fastdfs/pool/ConnectionPool.java @@ -63,7 +63,7 @@ public class ConnectionPool { if (socketAddress == null) { return null; } - return String.format("%s:%s", socketAddress.getHostName().trim(), socketAddress.getPort()); + return String.format("%s:%s", socketAddress.getHostName(), socketAddress.getPort()); } @Override